diff --git a/packages/insomnia/src/ui/routes/organization.tsx b/packages/insomnia/src/ui/routes/organization.tsx index ad0693a8aa4..fac9fa317e0 100644 --- a/packages/insomnia/src/ui/routes/organization.tsx +++ b/packages/insomnia/src/ui/routes/organization.tsx @@ -79,6 +79,22 @@ interface UserProfileResponse { } type PersonalPlanType = 'free' | 'individual' | 'team' | 'enterprise' | 'enterprise-member'; +const formatCurrentPlanType = (type: PersonalPlanType) => { + switch (type) { + case 'free': + return 'Free'; + case 'individual': + return 'Individual'; + case 'team': + return 'Team'; + case 'enterprise': + return 'Enterprise'; + case 'enterprise-member': + return 'Enterprise Member'; + default: + return 'Free'; + } +}; type PaymentSchedules = 'month' | 'year'; interface CurrentPlan { @@ -315,7 +331,7 @@ const UpgradeButton = () => { if (['team', 'enterprise'].includes(currentPlan?.type || '')) { return ( @@ -346,7 +362,7 @@ const UpgradeButton = () => { const OrganizationRoute = () => { const { settings, workspaceCount } = useRootLoaderData(); - const { organizations, user } = + const { organizations, user, currentPlan } = useLoaderData() as OrganizationLoaderData; const workspaceData = useRouteLoaderData( ':workspaceId', @@ -364,7 +380,6 @@ const OrganizationRoute = () => { projectId?: string; workspaceId?: string; }; - const [status, setStatus] = useState<'online' | 'offline'>('online'); useEffect(() => { @@ -417,6 +432,18 @@ const OrganizationRoute = () => {