From c9ce214a6682aa97238fbe108c40830c292095e2 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 12 Dec 2025 22:37:14 +0200 Subject: [PATCH] Gate NUX by country allowlist (#9549) * country gate nux * whoops --- src/components/contacts/FindContactsBannerNUX.tsx | 4 +++- .../dialogs/nuxs/FindContactsAnnouncement.tsx | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/contacts/FindContactsBannerNUX.tsx b/src/components/contacts/FindContactsBannerNUX.tsx index 476b06b13e..d2b2d1d3dd 100644 --- a/src/components/contacts/FindContactsBannerNUX.tsx +++ b/src/components/contacts/FindContactsBannerNUX.tsx @@ -14,13 +14,15 @@ import {Button} from '#/components/Button' import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times' import {Text} from '#/components/Typography' import {Link} from '../Link' +import {useIsFindContactsFeatureEnabledBasedOnGeolocation} from './country-allowlist' export function FindContactsBannerNUX() { const t = useTheme() const {_} = useLingui() const {visible, close} = useInternalState() + const isFeatureEnabled = useIsFindContactsFeatureEnabledBasedOnGeolocation() - if (!visible) return null + if (!visible || !isFeatureEnabled) return null return ( diff --git a/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx b/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx index 13f62a3e20..dd3aed013c 100644 --- a/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx +++ b/src/components/dialogs/nuxs/FindContactsAnnouncement.tsx @@ -9,12 +9,23 @@ import {logger} from '#/logger' import {isWeb} from '#/platform/detection' import {atoms as a, useTheme, web} from '#/alf' import {Button, ButtonText} from '#/components/Button' +import {useIsFindContactsFeatureEnabledBasedOnGeolocation} from '#/components/contacts/country-allowlist' import * as Dialog from '#/components/Dialog' import {useNuxDialogContext} from '#/components/dialogs/nuxs' import {Text} from '#/components/Typography' import {navigate} from '#/Navigation' export function FindContactsAnnouncement() { + const isFeatureEnabled = useIsFindContactsFeatureEnabledBasedOnGeolocation() + + if (!isFeatureEnabled) { + return null + } + + return +} + +function Inner() { const t = useTheme() const {_} = useLingui() const nuxDialogs = useNuxDialogContext()