diff options
author | dan <dan.abramov@gmail.com> | 2024-05-28 16:37:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-28 16:37:51 +0100 |
commit | 9bd411c15159609803c4e8c3e352a9db32ea527c (patch) | |
tree | 31305e290bd4597aa6ab441ecc556999b19ad693 /src/view/com/modals/DeleteAccount.tsx | |
parent | 8a2f43c218c464e6165f331e482b6094b87eefc7 (diff) | |
download | voidsky-9bd411c15159609803c4e8c3e352a9db32ea527c.tar.zst |
Replace getAgent() with reading agent (#4243)
* Replace getAgent() with agent * Replace {agent} with agent
Diffstat (limited to 'src/view/com/modals/DeleteAccount.tsx')
-rw-r--r-- | src/view/com/modals/DeleteAccount.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/view/com/modals/DeleteAccount.tsx b/src/view/com/modals/DeleteAccount.tsx index cab5dc289..06f1e111a 100644 --- a/src/view/com/modals/DeleteAccount.tsx +++ b/src/view/com/modals/DeleteAccount.tsx @@ -31,7 +31,7 @@ export function Component({}: {}) { const pal = usePalette('default') const theme = useTheme() const {currentAccount} = useSession() - const {getAgent} = useAgent() + const agent = useAgent() const {removeAccount} = useSessionApi() const {_} = useLingui() const {closeModal} = useModalControls() @@ -45,7 +45,7 @@ export function Component({}: {}) { setError('') setIsProcessing(true) try { - await getAgent().com.atproto.server.requestAccountDelete() + await agent.com.atproto.server.requestAccountDelete() setIsEmailSent(true) } catch (e: any) { setError(cleanError(e)) @@ -63,7 +63,7 @@ export function Component({}: {}) { try { // inform chat service of intent to delete account - const {success} = await getAgent().api.chat.bsky.actor.deleteAccount( + const {success} = await agent.api.chat.bsky.actor.deleteAccount( undefined, { headers: DM_SERVICE_HEADERS, @@ -72,7 +72,7 @@ export function Component({}: {}) { if (!success) { throw new Error('Failed to inform chat service of account deletion') } - await getAgent().com.atproto.server.deleteAccount({ + await agent.com.atproto.server.deleteAccount({ did: currentAccount.did, password, token, |