about summary refs log tree commit diff
path: root/src/state/queries/handle.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/queries/handle.ts')
-rw-r--r--src/state/queries/handle.ts13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/state/queries/handle.ts b/src/state/queries/handle.ts
index d7c411699..ddeb35ce7 100644
--- a/src/state/queries/handle.ts
+++ b/src/state/queries/handle.ts
@@ -1,11 +1,16 @@
 import React from 'react'
-import {useQueryClient, useMutation} from '@tanstack/react-query'
+import {useMutation, useQueryClient} from '@tanstack/react-query'
 
-import {getAgent} from '#/state/session'
 import {STALE} from '#/state/queries'
+import {getAgent} from '#/state/session'
 
-const fetchHandleQueryKey = (handleOrDid: string) => ['handle', handleOrDid]
-const fetchDidQueryKey = (handleOrDid: string) => ['did', handleOrDid]
+const handleQueryKeyRoot = 'handle'
+const fetchHandleQueryKey = (handleOrDid: string) => [
+  handleQueryKeyRoot,
+  handleOrDid,
+]
+const didQueryKeyRoot = 'did'
+const fetchDidQueryKey = (handleOrDid: string) => [didQueryKeyRoot, handleOrDid]
 
 export function useFetchHandle() {
   const queryClient = useQueryClient()