mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -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 />;
|
||||
}
|
||||
|
||||
// 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.
|
||||
if (isOnboarding) {
|
||||
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 (isCloud && data?.length) {
|
||||
return <InvitationList invitations={data} />;
|
||||
|
|
Loading…
Reference in a new issue