|
@@ -4,6 +4,7 @@ import Tabs from "@/components/Tabs";
|
|
|
import { useTranslations } from "next-intl";
|
|
|
import { FC, useState } from "react";
|
|
|
import actions from "./actions";
|
|
|
+import Email from "./components/Email";
|
|
|
import { default as Notices } from "./components/Notices";
|
|
|
|
|
|
interface Props {
|
|
@@ -42,16 +43,37 @@ const NotificationClient: FC<Props> = (props) => {
|
|
|
const defaultTabs = [
|
|
|
{
|
|
|
id: 1,
|
|
|
- name: t("systemMessage"),
|
|
|
+ name: (
|
|
|
+ <div className="flex items-center text-[.14rem]">
|
|
|
+ <i className="iconfont icon-laba mr-[.02rem] text-[.14rem]"></i>
|
|
|
+ <div>{t("systemMessage")}</div>
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
content: systemNotices.reduce((count, notice) => count + (notice.is_read ? 0 : 1), 0),
|
|
|
render: <Notices data={systemNotices} type={"system"} handler={handler} />,
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
- name: t("personalMessage"),
|
|
|
+ name: (
|
|
|
+ <div className="flex items-center text-[.14rem]">
|
|
|
+ <i className="iconfont icon-yonghu mr-[.02rem] text-[.16rem]"></i>
|
|
|
+ <div>{t("personalMessage")}</div>
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
content: userNotices.reduce((count, notice) => count + (notice.is_read ? 0 : 1), 0),
|
|
|
render: <Notices data={userNotices} type={"user"} handler={handler} />,
|
|
|
},
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ name: (
|
|
|
+ <div className="flex items-center text-[.14rem]">
|
|
|
+ <i className="iconfont icon-duanxinguanli mr-[.02rem] text-[.18rem]"></i>
|
|
|
+ <div>{t("email")}</div>
|
|
|
+ </div>
|
|
|
+ ),
|
|
|
+ content: userNotices.reduce((count, notice) => count + (notice.is_read ? 0 : 1), 0),
|
|
|
+ render: <Email></Email>,
|
|
|
+ },
|
|
|
];
|
|
|
return <Tabs items={defaultTabs} />;
|
|
|
};
|