mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 00:16:37 +08:00
修复聊天按钮bug
This commit is contained in:
parent
6b4d30d76d
commit
5314272c62
@ -15,7 +15,7 @@ import {
|
|||||||
IconLayers,
|
IconLayers,
|
||||||
IconSetting,
|
IconSetting,
|
||||||
IconCreditCard,
|
IconCreditCard,
|
||||||
IconSemiLogo,
|
IconComment,
|
||||||
IconHome,
|
IconHome,
|
||||||
IconImage
|
IconImage
|
||||||
} from '@douyinfe/semi-icons';
|
} from '@douyinfe/semi-icons';
|
||||||
@ -36,7 +36,13 @@ let headerButtons = [
|
|||||||
icon: <IconLayers/>,
|
icon: <IconLayers/>,
|
||||||
className: isAdmin()?'semi-navigation-item-normal':'tableHiddle',
|
className: isAdmin()?'semi-navigation-item-normal':'tableHiddle',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '聊天',
|
||||||
|
itemKey: 'chat',
|
||||||
|
to: '/chat',
|
||||||
|
icon: <IconComment />,
|
||||||
|
className: localStorage.getItem('chat_link')?'semi-navigation-item-normal':'tableHiddle',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: '令牌',
|
text: '令牌',
|
||||||
itemKey: 'token',
|
itemKey: 'token',
|
||||||
@ -89,14 +95,6 @@ let headerButtons = [
|
|||||||
// }
|
// }
|
||||||
];
|
];
|
||||||
|
|
||||||
if (localStorage.getItem('chat_link')) {
|
|
||||||
headerButtons.splice(1, 0, {
|
|
||||||
name: '聊天',
|
|
||||||
to: '/chat',
|
|
||||||
icon: 'comments'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const HeaderBar = () => {
|
const HeaderBar = () => {
|
||||||
const [userState, userDispatch] = useContext(UserContext);
|
const [userState, userDispatch] = useContext(UserContext);
|
||||||
let navigate = useNavigate();
|
let navigate = useNavigate();
|
||||||
@ -134,6 +132,7 @@ const HeaderBar = () => {
|
|||||||
midjourney: "/midjourney",
|
midjourney: "/midjourney",
|
||||||
setting: "/setting",
|
setting: "/setting",
|
||||||
about: "/about",
|
about: "/about",
|
||||||
|
chat: "/chat",
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
|
Loading…
Reference in New Issue
Block a user