Skip to content

Commit

Permalink
hasBackupCodesPrinted should be set to false every time generating ne…
Browse files Browse the repository at this point in the history
…w codes
  • Loading branch information
renintw committed Jun 6, 2023
1 parent 4bc5dcd commit 89437d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions settings/src/components/backup-codes.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ function Manage( { setRegenerating } ) {
const {
user: {
userRecord: { record },
setHasBackupCodesPrinted,
},
} = useContext( GlobalContext );
const remaining = record[ '2fa_backup_codes_remaining' ];
Expand Down Expand Up @@ -214,6 +215,7 @@ function Manage( { setRegenerating } ) {
isSecondary
onClick={ () => {
setRegenerating( true );
setHasBackupCodesPrinted( false );
} }
>
Generate new backup codes
Expand Down

0 comments on commit 89437d5

Please sign in to comment.