+4








![devin-ai-integration[bot]](/assets/img/avatar_default.png)
devin-ai-integration[bot]
GitHub
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
benny@cal.com <benny@cal.com>
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
benny@cal.com <benny@cal.com>
4383d23d4c
* fix: replace hard-coded strings with translation keys for internationalization Co-Authored-By: benny@cal.com <benny@cal.com> * fix: replace loading text with translation key Co-Authored-By: benny@cal.com <benny@cal.com> * fix: add translation keys for platform plans view Co-Authored-By: benny@cal.com <benny@cal.com> * fix: add translation keys for oauth view Co-Authored-By: benny@cal.com <benny@cal.com> * fix: add translation keys for users table Co-Authored-By: benny@cal.com <benny@cal.com> * fix: add translation keys for oauth view toast messages Co-Authored-By: benny@cal.com <benny@cal.com> * fix: add translation keys for verify view Co-Authored-By: benny@cal.com <benny@cal.com> * fix: update sendVerificationLogin to use t function Co-Authored-By: benny@cal.com <benny@cal.com> * fix: remove duplicate translation keys in common.json Co-Authored-By: benny@cal.com <benny@cal.com> * fix: add missing verification_email_sent translation key Co-Authored-By: benny@cal.com <benny@cal.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: benny@cal.com <benny@cal.com>
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
"use client";
|
|
|
|
import Shell from "@calcom/features/shell/Shell";
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
|
|
import NoPlatformPlan from "@components/settings/platform/dashboard/NoPlatformPlan";
|
|
import { useGetUserAttributes } from "@components/settings/platform/hooks/useGetUserAttributes";
|
|
import { PlatformPricing } from "@components/settings/platform/pricing/platform-pricing";
|
|
|
|
export default function PlatformPlans() {
|
|
const { t } = useLocale();
|
|
const { isUserLoading, isUserBillingDataLoading, isPlatformUser, isPaidUser, userBillingData, userOrgId } =
|
|
useGetUserAttributes();
|
|
|
|
if (isUserLoading || (isUserBillingDataLoading && !userBillingData)) {
|
|
return <div className="m-5">{t("loading")}</div>;
|
|
}
|
|
|
|
if (!isPlatformUser) return <NoPlatformPlan />;
|
|
|
|
return (
|
|
<div>
|
|
<Shell
|
|
backPath
|
|
isPlatformUser={true}
|
|
heading={
|
|
<h1 className="mx-2 mt-4 text-center text-xl md:text-2xl">
|
|
{t("currently_subscribed_to_plan", {
|
|
planFirstLetter: userBillingData?.plan[0],
|
|
planRest: userBillingData?.plan.slice(1).toLocaleLowerCase(),
|
|
})}
|
|
</h1>
|
|
}
|
|
withoutMain={false}
|
|
SidebarContainer={<></>}>
|
|
<PlatformPricing teamId={userOrgId} teamPlan={userBillingData?.plan.toLocaleLowerCase()} />
|
|
</Shell>
|
|
</div>
|
|
);
|
|
}
|