mirror of
https://github.com/logto-io/logto.git
synced 2025-03-10 22:22:45 -05:00
refactor(console): support navigating back by the browser when onboarding (#3612)
refactor(console): support navigate back by the browser when onboarding
This commit is contained in:
parent
e87ff837cd
commit
7a493abfca
4 changed files with 6 additions and 6 deletions
|
@ -46,11 +46,11 @@ function About() {
|
||||||
|
|
||||||
const onNext = async () => {
|
const onNext = async () => {
|
||||||
await onSubmit();
|
await onSubmit();
|
||||||
navigate(getOnboardingPage(OnboardingPage.SignInExperience), { replace: true });
|
navigate(getOnboardingPage(OnboardingPage.SignInExperience));
|
||||||
};
|
};
|
||||||
|
|
||||||
const onBack = async () => {
|
const onBack = async () => {
|
||||||
navigate(getOnboardingPage(OnboardingPage.Welcome), { replace: true });
|
navigate(getOnboardingPage(OnboardingPage.Welcome));
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -23,7 +23,7 @@ function Congrats() {
|
||||||
const enterAdminConsole = () => {
|
const enterAdminConsole = () => {
|
||||||
void update({ isOnboardingDone: true });
|
void update({ isOnboardingDone: true });
|
||||||
// Note: navigate to the admin console page directly instead of using the router
|
// Note: navigate to the admin console page directly instead of using the router
|
||||||
navigate(currentTenantId, { replace: true });
|
navigate(currentTenantId);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -236,7 +236,7 @@ function SignInExperience() {
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await handleSubmit(
|
await handleSubmit(
|
||||||
submit(() => {
|
submit(() => {
|
||||||
navigate(getOnboardingPage(OnboardingPage.Congrats), { replace: true });
|
navigate(getOnboardingPage(OnboardingPage.Congrats));
|
||||||
})
|
})
|
||||||
)();
|
)();
|
||||||
}}
|
}}
|
||||||
|
@ -246,7 +246,7 @@ function SignInExperience() {
|
||||||
title="general.back"
|
title="general.back"
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(getOnboardingPage(OnboardingPage.AboutUser), { replace: true });
|
navigate(getOnboardingPage(OnboardingPage.AboutUser));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</ActionBar>
|
</ActionBar>
|
||||||
|
|
|
@ -47,7 +47,7 @@ function Welcome() {
|
||||||
|
|
||||||
const onNext = async () => {
|
const onNext = async () => {
|
||||||
await onSubmit();
|
await onSubmit();
|
||||||
navigate(getOnboardingPage(OnboardingPage.AboutUser), { replace: true });
|
navigate(getOnboardingPage(OnboardingPage.AboutUser));
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Reference in a new issue