Treat reserved users like external users in the frontend.
This commit is contained in:
parent
24eba26c5b
commit
f35dbaf064
10 changed files with 21 additions and 9 deletions
|
@ -1,7 +1,10 @@
|
|||
const generateProfileLink = (id, screenName) => {
|
||||
import { includes } from 'lodash'
|
||||
|
||||
const generateProfileLink = (id, screenName, restrictedNicknames) => {
|
||||
const complicated = (isExternal(screenName) || includes(restrictedNicknames, screenName))
|
||||
return {
|
||||
name: (isExternal(screenName) ? 'external-user-profile' : 'user-profile'),
|
||||
params: (isExternal(screenName) ? { id } : { name: screenName })
|
||||
name: (complicated ? 'external-user-profile' : 'user-profile'),
|
||||
params: (complicated ? { id } : { name: screenName })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue