+
} />
} />
@@ -46,4 +46,4 @@ const Cloud = () => {
);
};
-export default Cloud;
+export default Onboard;
diff --git a/packages/console/src/cloud/types.ts b/packages/console/src/cloud/types.ts
index 5eb33d24a..95c60d08f 100644
--- a/packages/console/src/cloud/types.ts
+++ b/packages/console/src/cloud/types.ts
@@ -1,5 +1,9 @@
import { z } from 'zod';
+export enum CloudRoute {
+ Onboard = 'onboard',
+}
+
export enum CloudPage {
Welcome = 'welcome',
AboutUser = 'about-user',
diff --git a/packages/console/src/consts/tenants.ts b/packages/console/src/consts/tenants.ts
index 156a585ac..935034f6c 100644
--- a/packages/console/src/consts/tenants.ts
+++ b/packages/console/src/consts/tenants.ts
@@ -1,5 +1,7 @@
import { defaultTenantId, ossConsolePath } from '@logto/schemas';
+import { CloudRoute } from '@/cloud/types';
+
import { isCloud } from './cloud';
const isProduction = process.env.NODE_ENV === 'production';
@@ -10,7 +12,14 @@ export const adminTenantEndpoint =
export const getUserTenantId = () => {
if (isCloud) {
- return window.location.pathname.split('/')[1] ?? '';
+ const segment = window.location.pathname.split('/')[1];
+
+ // eslint-disable-next-line no-restricted-syntax
+ if (Object.values(CloudRoute).includes(segment as CloudRoute)) {
+ return '';
+ }
+
+ return segment ?? '';
}
return defaultTenantId;