Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap the notice in a <div> to ensure it remains on a single line. #301

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions settings/src/components/backup-codes.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
};

generateCodes();
}, [] );

Check warning on line 104 in settings/src/components/backup-codes.js

View workflow job for this annotation

GitHub Actions / All

React Hook useEffect has missing dependencies: 'setBackupCodesVerified', 'setError', and 'userRecord'. Either include them or remove the dependency array

// Finish the setup process.
const handleFinished = useCallback( async () => {

Check warning on line 107 in settings/src/components/backup-codes.js

View workflow job for this annotation

GitHub Actions / All

React Hook useCallback does nothing when called with only one argument. Did you forget to pass an array of dependencies?
// TODO: Add try catch here after https://github.com/WordPress/wporg-two-factor/pull/187/files is merged.
// The codes have already been saved to usermeta, see `generateCodes()` above.
setBackupCodesVerified( true );
Expand Down Expand Up @@ -230,10 +230,12 @@
{ backupCodesRemaining <= 5 && (
<Notice status="warning" isDismissible={ false }>
<Icon icon={ warning } />
You only have <strong>{ backupCodesRemaining }</strong> backup codes
remaining. Please regenerate and save new ones before you run out. If you
don&apos;t, you won&apos;t be able to log into your account if you lose your
phone.
<div>
You only have <strong>{ backupCodesRemaining }</strong> backup codes
remaining. Please regenerate and save new ones before you run out. If
you don&apos;t, you won&apos;t be able to log into your account if you
lose your phone.
</div>
</Notice>
) }
</div>
Expand Down
Loading