Skip to content

Commit

Permalink
Make the account restore button more prominent (#98338)
Browse files Browse the repository at this point in the history
* Make the account restore button more prominent

* Clean up me/account-restore flag as it's in production
  • Loading branch information
candy02058912 authored Jan 15, 2025
1 parent 25ffc5a commit 36346bb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 32 deletions.
36 changes: 9 additions & 27 deletions client/me/account-close/closed.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import config from '@automattic/calypso-config';
import { Button, Spinner } from '@wordpress/components';
import { useTranslate } from 'i18n-calypso';
import { useEffect } from 'react';
Expand Down Expand Up @@ -67,36 +66,19 @@ function AccountDeletedPage() {
<FormattedHeader
brandFont
headerText={ translate( 'Your account has been deleted' ) }
subHeaderText={
config.isEnabled( 'me/account-restore' )
? translate(
'Thanks for flying with WordPress.com. You have 30 days to restore your account if you change your mind.'
)
: translate( 'Thanks for flying with WordPress.com.' )
}
subHeaderText={ translate(
'Thanks for flying with WordPress.com. You have 30 days to restore your account if you change your mind.'
) }
/>
<div className="account-deleted__buttons">
<Button variant="secondary" onClick={ onCancelClick }>
{ restoreToken && (
<Button variant="secondary" onClick={ onRestoreClick } isBusy={ isRestoring }>
{ translate( 'I made a mistake! Restore my account' ) }
</Button>
) }
<Button variant="link" onClick={ onCancelClick } className="account-deleted__button-link">
{ translate( 'Return to WordPress.com' ) }
</Button>
{ config.isEnabled( 'me/account-restore' ) &&
restoreToken &&
( isRestoring ? (
<div className="account-deleted__restoring">
<Spinner />
<span className="account-deleted__restoring-text">
{ translate( 'Restoring your account' ) }
</span>
</div>
) : (
<Button
variant="link"
className="account-deleted__button-link"
onClick={ onRestoreClick }
>
{ translate( 'I made a mistake! Restore my account' ) }
</Button>
) ) }
</div>
</BlankCanvas.Content>
</BlankCanvas>
Expand Down
1 change: 0 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
"marketplace-test": true,
"me/account-close": true,
"me/account/color-scheme-picker": true,
"me/account-restore": true,
"me/vat-details": true,
"migration-flow/experiment": false,
"migration-flow/introductory-offer": true,
Expand Down
1 change: 0 additions & 1 deletion config/horizon.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
"marketplace-reviews-notification": false,
"marketplace-test": false,
"me/account/color-scheme-picker": true,
"me/account-restore": true,
"me/vat-details": true,
"migration-flow/experiment": false,
"migration-flow/introductory-offer": true,
Expand Down
1 change: 0 additions & 1 deletion config/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
"marketplace-test": false,
"me/account-close": true,
"me/account/color-scheme-picker": true,
"me/account-restore": true,
"me/vat-details": true,
"migration-flow/experiment": false,
"migration-flow/introductory-offer": true,
Expand Down
1 change: 0 additions & 1 deletion config/stage.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
"marketplace-test": true,
"me/account-close": true,
"me/account/color-scheme-picker": true,
"me/account-restore": true,
"me/vat-details": true,
"migration-flow/experiment": false,
"migration-flow/introductory-offer": true,
Expand Down
1 change: 0 additions & 1 deletion config/wpcalypso.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
"marketplace-test": true,
"me/account-close": true,
"me/account/color-scheme-picker": true,
"me/account-restore": true,
"me/vat-details": true,
"migration-flow/experiment": false,
"migration-flow/introductory-offer": true,
Expand Down

0 comments on commit 36346bb

Please sign in to comment.