Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client

Use Prompt.Action for delete account buttons (#9889)

authored by

DS Boyce and committed by
GitHub
7c08bba6 29bc0f13

+17 -24
+17 -24
src/screens/Settings/components/DeleteAccountDialog.tsx
··· 10 10 import {useAgent, useSession, useSessionApi} from '#/state/session' 11 11 import {atoms as a, useTheme, web} from '#/alf' 12 12 import {Admonition} from '#/components/Admonition' 13 - import {Button, ButtonIcon, ButtonText} from '#/components/Button' 14 13 import {type DialogOuterProps} from '#/components/Dialog' 15 14 import { 16 15 isValidCode, ··· 197 196 </Prompt.DescriptionText> 198 197 </Prompt.Content> 199 198 <Prompt.Actions> 200 - <Button 201 - color="primary" 202 - label={_(msg`Send email`)} 203 - size="large" 204 - onPress={handleSendEmail}> 205 - <ButtonText>{_(msg`Send email`)}</ButtonText> 206 - <ButtonIcon 207 - icon={emailState === EmailState.PENDING ? Loader : Envelope} 208 - /> 209 - </Button> 199 + <Prompt.Action 200 + icon={emailState === EmailState.PENDING ? Loader : Envelope} 201 + cta={_(msg`Send email`)} 202 + shouldCloseOnPress={false} 203 + onPress={handleSendEmail} 204 + /> 210 205 <Prompt.Cancel /> 211 206 </Prompt.Actions> 212 207 {error && ( ··· 314 309 </TextField.Root> 315 310 </View> 316 311 <Prompt.Actions> 317 - <Button 312 + <Prompt.Action 318 313 color="negative" 319 314 disabled={!isValidCode(confirmCode) || !isPasswordValid(password)} 320 - size="large" 321 - label={_(msg`Delete My Account`)} 322 - onPress={handleDeleteAccount}> 323 - <ButtonText>{_(msg`Delete My Account`)}</ButtonText> 324 - </Button> 315 + cta={_(msg`Delete my account`)} 316 + shouldCloseOnPress={false} 317 + onPress={handleDeleteAccount} 318 + /> 325 319 <Prompt.Cancel /> 326 320 </Prompt.Actions> 327 321 {error && ( ··· 340 334 </Prompt.TitleText> 341 335 <Prompt.DescriptionText> 342 336 <Trans> 343 - This will irreversably delete your Bluesky account{' '} 337 + This will irreversibly delete your Bluesky account{' '} 344 338 <Span style={[a.font_semi_bold, t.atoms.text]}> 345 339 {currentHandle} 346 340 </Span>{' '} ··· 356 350 </Prompt.DescriptionText> 357 351 </Prompt.Content> 358 352 <Prompt.Actions> 359 - <Button 353 + <Prompt.Action 360 354 color="negative" 361 - size="large" 362 - label={_(msg`Yes, delete my account`)} 363 - onPress={handleConfirmDeletion}> 364 - <ButtonText>{_(msg`Yes, delete my account`)}</ButtonText> 365 - </Button> 355 + cta={_(msg`Yes, delete my account`)} 356 + shouldCloseOnPress={false} 357 + onPress={handleConfirmDeletion} 358 + /> 366 359 <Prompt.Cancel /> 367 360 </Prompt.Actions> 368 361 </>