fix: improve fetch interval

This commit is contained in:
fantasticit 2022-05-24 17:49:57 +08:00
parent 0479f3c8f6
commit 98faa451b5
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ export const useUnreadMessages = () => {
const { data, error, isLoading, refetch } = useQuery(
[MessageApiDefinition.getUnread.client(), page],
() => getMessagesApi('getUnread')(page),
{ keepPreviousData: true, refetchInterval: 500 }
{ keepPreviousData: true, refetchInterval: 2000 }
);
const readMessage = useCallback(