diff options
| -rw-r--r-- | gui/src/renderer/components/ExpiredAccountAddTime.tsx | 14 | ||||
| -rw-r--r-- | gui/src/renderer/transitions.ts | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gui/src/renderer/components/ExpiredAccountAddTime.tsx b/gui/src/renderer/components/ExpiredAccountAddTime.tsx index 0e001aa358..2564fc5b0c 100644 --- a/gui/src/renderer/components/ExpiredAccountAddTime.tsx +++ b/gui/src/renderer/components/ExpiredAccountAddTime.tsx @@ -127,11 +127,19 @@ interface ITimeAddedProps { } export function TimeAdded(props: ITimeAddedProps) { - const history = useHistory(); + const history = useHistory() as History; const accountData = useSelector((state: IReduxState) => state.account); + const isNewAccount = useSelector( + (state: IReduxState) => + state.account.status.type === 'ok' && state.account.status.method === 'new_account', + ); const navigateToSetupFinished = useCallback(() => { - history.push('/main/setup-finished'); + if (isNewAccount) { + history.push('/main/setup-finished'); + } else { + history.resetTo('/main'); + } }, [history]); const duration = @@ -208,7 +216,7 @@ export function SetupFinished() { <AriaDescribed> <AppButton.BlueButton onClick={openPrivacyLink}> <AppButton.Label> - {messages.pgettext('connect-view', 'Learn more about privacy')} + {messages.pgettext('connect-view', 'Learn about privacy')} </AppButton.Label> <AriaDescription> <AppButton.Icon diff --git a/gui/src/renderer/transitions.ts b/gui/src/renderer/transitions.ts index 9dbf971c45..8dfd2d38ee 100644 --- a/gui/src/renderer/transitions.ts +++ b/gui/src/renderer/transitions.ts @@ -52,6 +52,7 @@ const transitionRules = [ r('/main', '/main/voucher/redeem', transitions.push), r('/main/voucher/redeem', '/main/voucher/success', transitions.push), r('/main/voucher/success', '/main/setup-finished', transitions.push), + r('/main/voucher/success', '/main', transitions.push), r('/main/setup-finished', '/main', transitions.push), r(null, '/settings', transitions.slide), r(null, '/select-location', transitions.slide), |
