From bc9ad2c2d95c38753ce43d257d8131d1e52effd9 Mon Sep 17 00:00:00 2001 From: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Date: Fri, 17 Apr 2026 10:48:08 -0700 Subject: [PATCH] Fix crash when deleting account from NoAccessScreen (#10283) --- src/components/Link.tsx | 10 ++-- .../components/DeleteAccountDialog.tsx | 50 ++++++++----------- 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/src/components/Link.tsx b/src/components/Link.tsx index 653e281c10..7d55a5f48b 100644 --- a/src/components/Link.tsx +++ b/src/components/Link.tsx @@ -141,18 +141,18 @@ export function useLink({ }) } else { if (isExternal) { - openLink(href, overridePresentation, shouldProxy) + void openLink(href, overridePresentation, shouldProxy) } else { const shouldOpenInNewTab = shouldClickOpenNewTab(e) if (isBskyDownloadUrl(href)) { - shareUrl(BSKY_DOWNLOAD_URL) + void shareUrl(BSKY_DOWNLOAD_URL) } else if ( shouldOpenInNewTab || href.startsWith('http') || href.startsWith('mailto') ) { - openLink(href) + void openLink(href) } else { closeModal() // close any active modals @@ -232,7 +232,7 @@ export function useLink({ share: true, }) } else { - shareUrl(href) + void shareUrl(href) } }, [ disableMismatchWarning, @@ -451,7 +451,7 @@ export function SimpleInlineLinkText({ const onPress = (e: GestureResponderEvent) => { const exitEarlyIfFalse = outerOnPress?.(e) if (exitEarlyIfFalse === false) return - Linking.openURL(href) + void Linking.openURL(href) } return ( diff --git a/src/screens/Settings/components/DeleteAccountDialog.tsx b/src/screens/Settings/components/DeleteAccountDialog.tsx index f7f33f75eb..9903fce3ba 100644 --- a/src/screens/Settings/components/DeleteAccountDialog.tsx +++ b/src/screens/Settings/components/DeleteAccountDialog.tsx @@ -9,7 +9,7 @@ import {useCleanError} from '#/lib/hooks/useCleanError' import {sanitizeHandle} from '#/lib/strings/handles' import {logger} from '#/logger' import {useAgent, useSession, useSessionApi} from '#/state/session' -import {atoms as a, useTheme, web} from '#/alf' +import {atoms as a, useTheme} from '#/alf' import {Admonition} from '#/components/Admonition' import {type DialogOuterProps} from '#/components/Dialog' import { @@ -19,7 +19,7 @@ import { import * as TextField from '#/components/forms/TextField' import {Envelope_Stroke2_Corner0_Rounded as Envelope} from '#/components/icons/Envelope' import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock' -import {createStaticClick, InlineLinkText} from '#/components/Link' +import {createStaticClick, SimpleInlineLinkText} from '#/components/Link' import {Loader} from '#/components/Loader' import * as Prompt from '#/components/Prompt' import * as toast from '#/components/Toast' @@ -113,12 +113,9 @@ function DeleteAccountDialogInner({ } const token = confirmCode.replace(WHITESPACE_RE, '') // Inform chat service of intent to delete account. - const {success} = await agent.api.chat.bsky.actor.deleteAccount( - undefined, - { - headers: DM_SERVICE_HEADERS, - }, - ) + const {success} = await agent.chat.bsky.actor.deleteAccount(undefined, { + headers: DM_SERVICE_HEADERS, + }) if (!success) { throw new Error('Failed to inform chat service of account deletion') } @@ -213,11 +210,11 @@ function DeleteAccountDialogInner({ You can also{' '} - + temporarily deactivate - {' '} + {' '} your account instead. Your profile, posts, feeds, and lists will no longer be visible to other Bluesky users. You can reactivate your account at any time by logging in. @@ -262,24 +259,20 @@ function DeleteAccountDialogInner({ {emailSentCount > 1 ? ( Email sent!{' '} - { - void handleSendEmail() - })}> + Click here to resend. - + ) : ( Don’t see a code?{' '} - { - void handleSendEmail() - })}> + Click here to resend. - + )}{' '} @@ -340,12 +333,11 @@ function DeleteAccountDialogInner({ {currentHandle} {' '} and all associated data. Note that this will affect any other{' '} - + AT Protocol - {' '} + {' '} services you use with this account.