refactor: add the ability to poll for notifications

This commit is contained in:
robin 2022-09-28 15:21:24 +08:00
parent a95ef9a477
commit 87fc998f92
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ export const useQueryNotificationRedDot = () => {
return useSWR<{ inbox: number; achievement: number }>(
isLogin() ? apiUrl : null,
request.instance.get,
{
refreshInterval: 3000,
},
);
};