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

HMS-2151 fix: remember settings on step-back to token page #10

Merged
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
6 changes: 6 additions & 0 deletions src/Routes/WizardPage/WizardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@

/** Event triggered when Back button is clicked. */
const onPreviousPage = (
_newStep: { id?: string | number; name: React.ReactNode },

Check warning on line 73 in src/Routes/WizardPage/WizardPage.tsx

View workflow job for this annotation

GitHub Actions / validate

'_newStep' is defined but never used
_prevStep: { prevId?: string | number; prevName: React.ReactNode }

Check warning on line 74 in src/Routes/WizardPage/WizardPage.tsx

View workflow job for this annotation

GitHub Actions / validate

'_prevStep' is defined but never used
) => {
// TODO If not needed at the end clean-up onPreviousPage
console.log('onPreviousPage fired');
Expand All @@ -80,8 +80,8 @@

/** Event triggered when a specific page is clicked. */
const onGoToStep = (
_newStep: { id?: string | number; name: React.ReactNode },

Check warning on line 83 in src/Routes/WizardPage/WizardPage.tsx

View workflow job for this annotation

GitHub Actions / validate

'_newStep' is defined but never used
_prevStep: { prevId?: string | number; prevName: React.ReactNode }

Check warning on line 84 in src/Routes/WizardPage/WizardPage.tsx

View workflow job for this annotation

GitHub Actions / validate

'_prevStep' is defined but never used
) => {
// TODO If not needed at the end clean-up onPreviousPage
console.log('onGoToStep fired');
Expand Down Expand Up @@ -121,6 +121,12 @@
};

const onVerify = (value: VerifyState, data?: Domain) => {
if (appContext.wizard.getRegisteredStatus() === 'completed') {
// verify was previously completed (e.g. user stepped the wizard
// back to the token page. Do not overwrite the domain value,
// so that we do not discard any user-specified settings.
return;
}
appContext.wizard.setRegisteredStatus(value);
if (value === 'completed') {
data && appContext.wizard.setDomain(data);
Expand Down
Loading