rm unused mutation

This commit is contained in:
Hailey
2024-06-12 12:11:27 -07:00
parent d1175f9848
commit 78b0149fd3
+2 -31
View File
@@ -1,7 +1,7 @@
import {StarterPackView} from '@atproto/api/dist/client/types/app/bsky/graph/defs'
import {QueryClient, useMutation, useQuery} from '@tanstack/react-query'
import {QueryClient, useQuery} from '@tanstack/react-query'
import {useAgent, useSession} from 'state/session'
import {useAgent} from 'state/session'
const RQKEY_ROOT = 'starter-pack'
const RQKEY = (did?: string, rkey?: string) => [RQKEY_ROOT, did, rkey]
@@ -28,35 +28,6 @@ export function useStarterPackQuery({
})
}
export function useDeleteStarterPackMutation({
onError,
onSuccess,
}: {
onError: () => void
onSuccess: () => void
}) {
const agent = useAgent()
const {currentAccount} = useSession()
return useMutation({
mutationFn: async (rkey: string, listRkey?: string) => {
await agent.app.bsky.graph.starterpack.delete({
repo: currentAccount!.did,
rkey,
})
if (listRkey) {
await agent.app.bsky.graph.list.delete({
repo: currentAccount!.did,
rkey: listRkey,
})
}
},
onError,
onSuccess,
})
}
export async function invalidateStarterPack({
queryClient,
did,