Parcourir la source

fix: 更新站内信提示

Before il y a 7 mois
Parent
commit
0e801782ad

+ 3 - 2
src/app/[locale]/(TabBar)/profile/component/ItemCom/index.tsx

@@ -18,8 +18,9 @@ export interface ItemComProps {
 const ItemCom: FC<ItemComProps> = ({ type = "login" }) => {
     const t = useTranslations("ProfilePage");
 
-    const { unread } = useGlobalNoticeStore((state) => ({
+    const { unread, userUnread } = useGlobalNoticeStore((state) => ({
         unread: state.unread,
+        userUnread: state.userUnred,
     }));
     const links = [
         { label: "gratis", desc: "gratisDesc", icon: "", url: "/", content: null },
@@ -56,7 +57,7 @@ const ItemCom: FC<ItemComProps> = ({ type = "login" }) => {
             desc: "",
             icon: "",
             url: "/notification",
-            content: unread ? Badge.dot : null,
+            content: unread || userUnread ? Badge.dot : null,
         },
         { label: "initial", desc: "", icon: "", url: "/", content: null },
     ];

+ 2 - 1
src/components/Footer/index.tsx

@@ -137,7 +137,8 @@ const Footer: FC = () => {
                                     ) : (
                                         <Badge
                                             content={
-                                                (index === 4 && unread) || userUnred
+                                                (index === 4 && unread) ||
+                                                (index === 4 && userUnred)
                                                     ? Badge.dot
                                                     : null
                                             }