From cd7b54459ef3b3c53b2c17e5bc5d41b2e1e315cd Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Tue, 28 May 2024 22:01:16 +0800 Subject: [PATCH] refactor(console): prioritize onboarding check for route redirect --- packages/console/src/cloud/pages/Main/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/console/src/cloud/pages/Main/index.tsx b/packages/console/src/cloud/pages/Main/index.tsx index 53351449a..3521624f9 100644 --- a/packages/console/src/cloud/pages/Main/index.tsx +++ b/packages/console/src/cloud/pages/Main/index.tsx @@ -23,16 +23,16 @@ export default function Main() { return ; } - // If current tenant ID is not set, but the defaultTenantId is available. - if (defaultTenantId) { - return ; - } - // A new user has just signed up, redirect them to the onboarding flow. if (isOnboarding) { return ; } + // If current tenant ID is not set, but the defaultTenantId is available. + if (defaultTenantId) { + return ; + } + // If user has pending invitations (onboarding will be skipped), show the invitation list and allow them to quick join. if (isCloud && data?.length) { return ;