Bluesky app fork with some witchin' additions 💫

Gate NUX by country allowlist (#9549)

* country gate nux

* whoops

authored by samuel.fm and committed by GitHub c9ce214a 9971e91f

Changed files
+14 -1
src
components
+3 -1
src/components/contacts/FindContactsBannerNUX.tsx
··· 14 14 import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times' 15 15 import {Text} from '#/components/Typography' 16 16 import {Link} from '../Link' 17 + import {useIsFindContactsFeatureEnabledBasedOnGeolocation} from './country-allowlist' 17 18 18 19 export function FindContactsBannerNUX() { 19 20 const t = useTheme() 20 21 const {_} = useLingui() 21 22 const {visible, close} = useInternalState() 23 + const isFeatureEnabled = useIsFindContactsFeatureEnabledBasedOnGeolocation() 22 24 23 - if (!visible) return null 25 + if (!visible || !isFeatureEnabled) return null 24 26 25 27 return ( 26 28 <View style={[a.w_full, a.p_lg, a.border_b, t.atoms.border_contrast_low]}>
+11
src/components/dialogs/nuxs/FindContactsAnnouncement.tsx
··· 9 9 import {isWeb} from '#/platform/detection' 10 10 import {atoms as a, useTheme, web} from '#/alf' 11 11 import {Button, ButtonText} from '#/components/Button' 12 + import {useIsFindContactsFeatureEnabledBasedOnGeolocation} from '#/components/contacts/country-allowlist' 12 13 import * as Dialog from '#/components/Dialog' 13 14 import {useNuxDialogContext} from '#/components/dialogs/nuxs' 14 15 import {Text} from '#/components/Typography' 15 16 import {navigate} from '#/Navigation' 16 17 17 18 export function FindContactsAnnouncement() { 19 + const isFeatureEnabled = useIsFindContactsFeatureEnabledBasedOnGeolocation() 20 + 21 + if (!isFeatureEnabled) { 22 + return null 23 + } 24 + 25 + return <Inner /> 26 + } 27 + 28 + function Inner() { 18 29 const t = useTheme() 19 30 const {_} = useLingui() 20 31 const nuxDialogs = useNuxDialogContext()