[🐴] infinite stale time (#4051)

zio/stable
Hailey 2024-05-16 11:58:45 -07:00 committed by GitHub
parent ef0ce951e7
commit dff6bd7c65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
import {DM_SERVICE_HEADERS} from '#/state/queries/messages/const'
import {useOnMarkAsRead} from '#/state/queries/messages/list-converations'
import {useAgent} from '#/state/session'
import {STALE} from 'state/queries'
import {RQKEY as LIST_CONVOS_KEY} from './list-converations'
const RQKEY_ROOT = 'convo'
@ -22,6 +23,7 @@ export function useConvoQuery(convo: ChatBskyConvoDefs.ConvoView) {
return data.convo
},
initialData: convo,
staleTime: STALE.INFINITY,
})
}