mirror of https://gitee.com/answerdev/answer.git
refactor: add the ability to poll for notifications
This commit is contained in:
parent
a95ef9a477
commit
87fc998f92
|
@ -36,6 +36,9 @@ export const useQueryNotificationRedDot = () => {
|
|||
return useSWR<{ inbox: number; achievement: number }>(
|
||||
isLogin() ? apiUrl : null,
|
||||
request.instance.get,
|
||||
{
|
||||
refreshInterval: 3000,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue