Treat reserved users like external users in the frontend.

This commit is contained in:
Lambda 2018-12-26 14:50:48 +01:00
parent 24eba26c5b
commit f35dbaf064
10 changed files with 21 additions and 9 deletions

View file

@ -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 })
}
}