Commit 04007b59 by Apple\Apple

馃悰 fix(sidebar): fix the sidebar user permission to display navigation

parent f2bca12d
......@@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next';
import {
isAdmin,
isRoot,
showError
} from '../../helpers/index.js';
......@@ -218,15 +219,17 @@ const SiderBar = () => {
itemKey: 'user',
to: '/user',
icon: <IconUser />,
className: isAdmin() ? '' : 'tableHiddle',
},
{
text: t('绯荤粺璁剧疆'),
itemKey: 'setting',
to: '/setting',
icon: <IconSetting />,
className: isRoot() ? '' : 'tableHiddle',
},
],
[isAdmin(), t],
[isAdmin(), isRoot(), t],
);
const chatMenuItems = useMemo(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment