From 6a923020e385e0d0c0ee627b8e7ed2dfe42f4eca Mon Sep 17 00:00:00 2001 From: hejianhao <15708179461@qq.com> Date: 星期五, 28 二月 2025 10:44:39 +0800 Subject: [PATCH] 修改bug --- management/src/components/RightContent/AvatarDropdown.tsx | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/management/src/components/RightContent/AvatarDropdown.tsx b/management/src/components/RightContent/AvatarDropdown.tsx index f552bf0..28db391 100644 --- a/management/src/components/RightContent/AvatarDropdown.tsx +++ b/management/src/components/RightContent/AvatarDropdown.tsx @@ -25,13 +25,13 @@ const [unreadCount, setUnreadCount] = useState(0); useEffect(() => { - // const timer = setInterval(() => { - // getUnreadCount().then((res: any) => { - // setUnreadCount(res.data || 0); - // }); - // }, 1000 * 5) + const timer = setInterval(() => { + getUnreadCount().then((res: any) => { + setUnreadCount(res.data || 0); + }); + }, 1000 * 5) - // return () => clearInterval(timer); + return () => clearInterval(timer); }, []); -- Gitblit v1.7.1