diff --git a/src/screens/StarterPack/Wizard/index.tsx b/src/screens/StarterPack/Wizard/index.tsx index a745e89e9e..18f822ba02 100644 --- a/src/screens/StarterPack/Wizard/index.tsx +++ b/src/screens/StarterPack/Wizard/index.tsx @@ -35,7 +35,7 @@ import { useEditStarterPackMutation, useStarterPackQuery, } from 'state/queries/starter-packs' -import {useAgent, useSession} from 'state/session' +import {useSession} from 'state/session' import {useSetMinimalShellMode} from 'state/shell' import * as Toast from '#/view/com/util/Toast' import {UserAvatar} from 'view/com/util/UserAvatar' @@ -49,7 +49,6 @@ import {Button, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' import {ListMaybePlaceholder} from '#/components/Lists' import {Loader} from '#/components/Loader' -import * as Prompt from '#/components/Prompt' import {WizardEditListDialog} from '#/components/StarterPack/Wizard/WizardEditListDialog' import {Text} from '#/components/Typography' import {Provider} from './State' @@ -141,7 +140,6 @@ function WizardInner({ const setMinimalShellMode = useSetMinimalShellMode() const {setEnabled} = useKeyboardController() const [state, dispatch] = useWizardState() - const agent = useAgent() const {currentAccount} = useSession() const {data: currentProfile} = useProfileQuery({ did: currentAccount?.did, @@ -269,31 +267,6 @@ function WizardInner({ } } - const deleteStarterPack = async () => { - if (!currentStarterPack || !currentListItems) return - - dispatch({type: 'SetProcessing', processing: true}) - - try { - await agent.app.bsky.graph.list.delete({ - repo: currentAccount!.did, - // TODO list is required, so shouldn't need this assertion - rkey: new AtUri(currentStarterPack.list!.uri).rkey, - }) - await agent.app.bsky.graph.starterpack.delete({ - repo: currentAccount!.did, - rkey: new AtUri(currentStarterPack.uri).rkey, - }) - - logEvent('starterPack:delete', {}) - navigation.popToTop() - } catch (e) { - Toast.show(_(msg`Failed to delete starter pack`)) - } finally { - dispatch({type: 'SetProcessing', processing: false}) - } - } - const onNext = () => { if (state.currentStep === 'Feeds') { submit() @@ -352,9 +325,7 @@ function WizardInner({ - + {state.currentStep === 'Details' ? ( ) : state.currentStep === 'Profiles' ? ( @@ -376,18 +347,9 @@ function WizardInner({ ) } -function Container({ - showDeleteBtn, - deleteStarterPack, - children, -}: { - showDeleteBtn: boolean - deleteStarterPack: () => Promise - children: React.ReactNode -}) { +function Container({children}: {children: React.ReactNode}) { const {_} = useLingui() const [state, dispatch] = useWizardState() - const control = useDialogControl() if (state.currentStep === 'Profiles' || state.currentStep === 'Feeds') { return {children} @@ -412,36 +374,6 @@ function Container({ Next - {showDeleteBtn && ( - - )} - - - Delete starter pack? - - - Are you sure you want delete this starter pack? - - - - - - )}