From 80304070e7dc862515622a6a4ae41d0cae30c928 Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 12 Aug 2024 23:31:47 +0800 Subject: [PATCH] chore: tweak plan header --- frontend/web/src/components/Header.tsx | 4 ++-- frontend/web/src/stores/subscription.ts | 2 ++ frontend/web/src/stores/workspace.ts | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/web/src/components/Header.tsx b/frontend/web/src/components/Header.tsx index 3207f79..7970db6 100644 --- a/frontend/web/src/components/Header.tsx +++ b/frontend/web/src/components/Header.tsx @@ -36,9 +36,9 @@ const Header: React.FC = () => { Slash - {profile.plan === PlanType.PRO && ( + {[PlanType.PRO, PlanType.ENTERPRISE].includes(profile.plan) && ( - PRO + {profile.plan} )} {shouldShowRouterSwitch && ( diff --git a/frontend/web/src/stores/subscription.ts b/frontend/web/src/stores/subscription.ts index 9b8f223..0624fa8 100644 --- a/frontend/web/src/stores/subscription.ts +++ b/frontend/web/src/stores/subscription.ts @@ -5,6 +5,8 @@ export const stringifyPlanType = (planType: PlanType) => { return "Free"; } else if (planType === PlanType.PRO) { return "Pro"; + } else if (planType === PlanType.ENTERPRISE) { + return "Enterprise"; } else { return "Unknown"; } diff --git a/frontend/web/src/stores/workspace.ts b/frontend/web/src/stores/workspace.ts index e5c6ecb..9aa8cd0 100644 --- a/frontend/web/src/stores/workspace.ts +++ b/frontend/web/src/stores/workspace.ts @@ -26,7 +26,6 @@ const useWorkspaceStore = create()((set, get) => ({ fetchWorkspaceProfile: async () => { const workspaceProfile = (await workspaceServiceClient.getWorkspaceProfile({})).profile as WorkspaceProfile; set({ ...get(), profile: workspaceProfile }); - console.log("workspaceProfile", workspaceProfile); return workspaceProfile; }, fetchWorkspaceSetting: async () => {