From 0d84b7af6e1249dd3f377939bec6f73de250cbac Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Sat, 15 Nov 2025 01:07:00 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8Fshow=20org=20page=20branding?= =?UTF-8?q?=20section=20only=20in=20saas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AuthPageBrandingForm.tsx | 115 +++++++++++++----------- 1 file changed, 63 insertions(+), 52 deletions(-) diff --git a/src/components/AuthPageBrandingForm.tsx b/src/components/AuthPageBrandingForm.tsx index 6d013816..76890d2b 100644 --- a/src/components/AuthPageBrandingForm.tsx +++ b/src/components/AuthPageBrandingForm.tsx @@ -41,6 +41,8 @@ import { CredenzaHeader, CredenzaTitle } from "./Credenza"; +import { usePaidStatus } from "@app/hooks/usePaidStatus"; +import { build } from "@server/build"; export type AuthPageCustomizationProps = { orgId: string; @@ -71,7 +73,7 @@ const AuthPageFormSchema = z.object({ ), logoWidth: z.coerce.number().min(1), logoHeight: z.coerce.number().min(1), - title: z.string(), + title: z.string().optional(), subtitle: z.string().optional(), resourceTitle: z.string(), resourceSubtitle: z.string().optional() @@ -83,6 +85,7 @@ export default function AuthPageBrandingForm({ }: AuthPageCustomizationProps) { const env = useEnvContext(); const api = createApiClient(env); + const { hasSaasSubscription } = usePaidStatus(); const router = useRouter(); @@ -258,58 +261,66 @@ export default function AuthPageBrandingForm({ - + {hasSaasSubscription && ( + <> + -
- ( - - - {t("brandingOrgTitle")} - - - {t( - "brandingOrgDescription", - { - orgName: - "{{orgName}}" - } - )} - - - - - - - )} - /> - ( - - - {t("brandingOrgSubtitle")} - - - {t( - "brandingOrgDescription", - { - orgName: - "{{orgName}}" - } - )} - - - - - - - )} - /> -
+
+ ( + + + {t( + "brandingOrgTitle" + )} + + + {t( + "brandingOrgDescription", + { + orgName: + "{{orgName}}" + } + )} + + + + + + + )} + /> + ( + + + {t( + "brandingOrgSubtitle" + )} + + + {t( + "brandingOrgDescription", + { + orgName: + "{{orgName}}" + } + )} + + + + + + + )} + /> +
+ + )}