Skip to content
Snippets Groups Projects
Unverified Commit 03fd08d1 authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

[FIX] Admin user blank page (#18851)

parent 6b8acd39
No related branches found
No related tags found
No related merge requests found
...@@ -61,11 +61,13 @@ export function UserInfoWithData({ uid, username, ...props }) { ...@@ -61,11 +61,13 @@ export function UserInfoWithData({ uid, username, ...props }) {
return <Box mbs='x16'>{t('User_not_found')}</Box>; return <Box mbs='x16'>{t('User_not_found')}</Box>;
} }
const admin = data.user?.roles?.includes('admin');
return <UserInfo return <UserInfo
{...user} {...user}
data={data.user} data={data.user}
onChange={onChange} onChange={onChange}
actions={data && data.user && <UserInfoActions isActive={data.user.active} isAdmin={data.user.roles.includes('admin')} _id={data.user._id} username={data.user.username} onChange={onChange}/>} actions={data && data.user && <UserInfoActions isActive={data.user.active} isAdmin={admin} _id={data.user._id} username={data.user.username} onChange={onChange}/>}
{...props} {...props}
/>; />;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment