From 78b0149fd3fd0ba2fdae6ad0c1ff8e061d9adfab Mon Sep 17 00:00:00 2001 From: Hailey Date: Wed, 12 Jun 2024 12:11:27 -0700 Subject: [PATCH] rm unused mutation --- src/state/queries/useStarterPackQuery.ts | 33 ++---------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/src/state/queries/useStarterPackQuery.ts b/src/state/queries/useStarterPackQuery.ts index f847371090..ca659f43b4 100644 --- a/src/state/queries/useStarterPackQuery.ts +++ b/src/state/queries/useStarterPackQuery.ts @@ -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,