feat: remove message notify

This commit is contained in:
fantasticit 2022-05-10 11:48:18 +08:00
parent 512018a1c0
commit 550467e2a8
1 changed files with 37 additions and 37 deletions

View File

@ -118,45 +118,45 @@ const MessageBox = () => {
toggleVisible(true); toggleVisible(true);
}, [isMobile, toggleVisible]); }, [isMobile, toggleVisible]);
useEffect(() => { // useEffect(() => {
if (!unreadMsgs || !unreadMsgs.total) return; // if (!unreadMsgs || !unreadMsgs.total) return;
const msg = unreadMsgs.data[0]; // const msg = unreadMsgs.data[0];
Notification.info({ // Notification.info({
title: '消息通知', // title: '消息通知',
content: ( // content: (
<> // <>
<div> // <div>
<Text // <Text
ellipsis={{ // ellipsis={{
showTooltip: { // showTooltip: {
opts: { content: msg.message }, // opts: { content: msg.message },
}, // },
}} // }}
style={{ width: 240 }} // style={{ width: 240 }}
> // >
{msg.title} // {msg.title}
</Text> // </Text>
</div> // </div>
<div> // <div>
<Text link> // <Text link>
<Link href={msg.url}> // <Link href={msg.url}>
<a className={styles.item} target="_blank"> // <a className={styles.item} target="_blank">
// 查看详情
</a> // </a>
</Link> // </Link>
</Text> // </Text>
</div> // </div>
</> // </>
), // ),
duration: 3, // duration: 3,
showClose: true, // showClose: true,
onHookClose() { // onHookClose() {
readMessage(msg.id); // readMessage(msg.id);
}, // },
}); // });
}, [unreadMsgs, readMessage]); // }, [unreadMsgs, readMessage]);
const content = ( const content = (
<Tabs <Tabs