mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
refactor(console): prioritize onboarding check for route redirect
This commit is contained in:
parent
b10e138f87
commit
cd7b54459e
1 changed files with 5 additions and 5 deletions
|
@ -23,16 +23,16 @@ export default function Main() {
|
||||||
return <AppLoading />;
|
return <AppLoading />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If current tenant ID is not set, but the defaultTenantId is available.
|
|
||||||
if (defaultTenantId) {
|
|
||||||
return <Redirect toTenantId={defaultTenantId} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
// A new user has just signed up, redirect them to the onboarding flow.
|
// A new user has just signed up, redirect them to the onboarding flow.
|
||||||
if (isOnboarding) {
|
if (isOnboarding) {
|
||||||
return <Navigate to={GlobalRoute.Onboarding} />;
|
return <Navigate to={GlobalRoute.Onboarding} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If current tenant ID is not set, but the defaultTenantId is available.
|
||||||
|
if (defaultTenantId) {
|
||||||
|
return <Redirect toTenantId={defaultTenantId} />;
|
||||||
|
}
|
||||||
|
|
||||||
// If user has pending invitations (onboarding will be skipped), show the invitation list and allow them to quick join.
|
// If user has pending invitations (onboarding will be skipped), show the invitation list and allow them to quick join.
|
||||||
if (isCloud && data?.length) {
|
if (isCloud && data?.length) {
|
||||||
return <InvitationList invitations={data} />;
|
return <InvitationList invitations={data} />;
|
||||||
|
|
Loading…
Reference in a new issue