Extract query key roots to constants (#3404)
* Extract query key roots to constants * Dedupe labelers-detailed-info * Align naming
This commit is contained in:
parent
b26abf212e
commit
b783745b2e
31 changed files with 202 additions and 143 deletions
|
@ -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>({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue