account for potential region fallthroughs on native

This commit is contained in:
vineyardbovines
2026-05-07 11:03:07 -04:00
parent c3bcd8d3f5
commit 9628532489
@@ -258,8 +258,6 @@ function RegionNotice() {
const locationControl = Dialog.useDialogControl() const locationControl = Dialog.useDialogControl()
const region = formatRegion(geolocation, i18n.locale) const region = formatRegion(geolocation, i18n.locale)
if (!region) return null
const isGPS = !!deviceGeolocation?.countryCode const isGPS = !!deviceGeolocation?.countryCode
return ( return (
@@ -289,47 +287,39 @@ function RegionNotice() {
/> />
)} )}
<Text style={[a.text_sm, a.leading_snug]}> {region && (
{isGPS ? ( <Text style={[a.text_sm, a.leading_snug]}>
<Trans> {isGPS ? (
Based on your device's location, we think you're in{' '}
<Text style={[a.text_sm, a.font_bold]}>{region}</Text>.
Some features are limited because of regional age laws.
</Trans>
) : (
<Trans>
Based on your network, we think you're in{' '}
<Text style={[a.text_sm, a.font_bold]}>{region}</Text>.
Some features are limited because of regional age laws.
</Trans>
)}
</Text>
{!isGPS &&
(IS_NATIVE ? (
<Text style={[a.text_sm, a.leading_snug]}>
<Trans> <Trans>
This estimate may be inaccurate if you're using a Based on your device's location, we think you're in{' '}
VPN.{' '} <Text style={[a.text_sm, a.font_bold]}>
<InlineLinkText {region}
label={l`Confirm your location`} </Text>
{...createStaticClick(() => { . Some features are limited because of regional age
locationControl.open() laws.
})}>
Tap here to confirm your location.
</InlineLinkText>
</Trans> </Trans>
</Text> ) : (
) : (
<Text style={[a.text_sm, a.leading_snug]}>
<Trans> <Trans>
This estimate may be inaccurate if you're using a Based on your network, we think you're in{' '}
VPN. <Text style={[a.text_sm, a.font_bold]}>
{region}
</Text>
. Some features are limited because of regional age
laws.
</Trans> </Trans>
</Text> )}
))} </Text>
)}
{isGPS && IS_NATIVE && ( {region && !isGPS && (
<Text style={[a.text_sm, a.leading_snug]}>
<Trans>
This estimate may be inaccurate if you're using a VPN.
</Trans>
</Text>
)}
{IS_NATIVE && (
<Text style={[a.text_sm, a.leading_snug]}> <Text style={[a.text_sm, a.leading_snug]}>
<Trans> <Trans>
<InlineLinkText <InlineLinkText