From 1e8690aaaeeddbe8c608b19962e354b57c521dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Thu, 30 Jul 2026 15:09:14 +0200 Subject: [PATCH] Extract locale mismatch callout variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match the unsigned-NDA banner layout: keep layout classes in tv slots so the callout shell stays free of raw utilities. Signed-off-by: Émile Ré --- .../LocaleMismatchCallout.tsx | 23 ++++++------ .../LocaleMismatchCallout/variants.ts | 36 +++++++++++++++++++ .../components/UnsignedNDACallout/variants.ts | 2 +- .../src/pages/MainLayout.tsx | 2 +- 4 files changed, 49 insertions(+), 14 deletions(-) rename apps/compliance-portal/src/components/{ => LocaleMismatchCallout}/LocaleMismatchCallout.tsx (89%) create mode 100644 apps/compliance-portal/src/components/LocaleMismatchCallout/variants.ts diff --git a/apps/compliance-portal/src/components/LocaleMismatchCallout.tsx b/apps/compliance-portal/src/components/LocaleMismatchCallout/LocaleMismatchCallout.tsx similarity index 89% rename from apps/compliance-portal/src/components/LocaleMismatchCallout.tsx rename to apps/compliance-portal/src/components/LocaleMismatchCallout/LocaleMismatchCallout.tsx index 954985928..da5789037 100644 --- a/apps/compliance-portal/src/components/LocaleMismatchCallout.tsx +++ b/apps/compliance-portal/src/components/LocaleMismatchCallout/LocaleMismatchCallout.tsx @@ -37,6 +37,7 @@ import { useLocale } from "#/lib/i18n/useLocale"; import { useUpdateLocale } from "#/lib/i18n/useUpdateLocale"; import type { LocaleMismatchCallout_identity$key } from "./__generated__/LocaleMismatchCallout_identity.graphql"; +import { localeMismatchCallout } from "./variants"; const localeMismatchCalloutFragment = graphql` fragment LocaleMismatchCallout_identity on Identity { @@ -94,6 +95,7 @@ export function LocaleMismatchCallout({ identityKey }: LocaleMismatchCalloutProp const urlLabel = URL_LOCALE_LABELS[urlLocale]; const savedLabel = URL_LOCALE_LABELS[savedLocale]; const busy = isChanging || isUpdating; + const slots = localeMismatchCallout(); const switchToSaved = () => { void changeLocale(savedLocale, { persist: false }); @@ -106,13 +108,10 @@ export function LocaleMismatchCallout({ identityKey }: LocaleMismatchCalloutProp }; return ( -