Extract query key roots to constants (#3404)

* Extract query key roots to constants

* Dedupe labelers-detailed-info

* Align naming
This commit is contained in:
dan
2024-04-04 18:57:38 +01:00
committed by GitHub
parent b26abf212e
commit b783745b2e
31 changed files with 202 additions and 143 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ import {updatePostShadow} from '#/state/cache/post-shadow'
import {Shadow} from '#/state/cache/types'
import {getAgent} from '#/state/session'
export const RQKEY = (postUri: string) => ['post', postUri]
const RQKEY_ROOT = 'post'
export const RQKEY = (postUri: string) => [RQKEY_ROOT, postUri]
export function usePostQuery(uri: string | undefined) {
return useQuery<AppBskyFeedDefs.PostView>({