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
@@ -1,7 +1,8 @@
import {BskyAgent} from '@atproto/api'
import {useQuery} from '@tanstack/react-query'
export const RQKEY = (serviceUrl: string) => ['service', serviceUrl]
const RQKEY_ROOT = 'service'
export const RQKEY = (serviceUrl: string) => [RQKEY_ROOT, serviceUrl]
export function useServiceQuery(serviceUrl: string) {
return useQuery({