Cleanup
This commit is contained in:
@@ -41,6 +41,8 @@ import {
|
|||||||
} from '#/ageAssurance/util'
|
} from '#/ageAssurance/util'
|
||||||
import {useDeviceGeolocationApi} from '#/geolocation'
|
import {useDeviceGeolocationApi} from '#/geolocation'
|
||||||
|
|
||||||
|
const textStyles = [a.text_md, a.leading_snug]
|
||||||
|
|
||||||
export function NoAccessScreen() {
|
export function NoAccessScreen() {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
@@ -63,14 +65,6 @@ export function NoAccessScreen() {
|
|||||||
logger.metric(`blockedGeoOverlay:shown`, {})
|
logger.metric(`blockedGeoOverlay:shown`, {})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const textStyles = [a.text_md, a.leading_normal]
|
|
||||||
|
|
||||||
const blocks = [
|
|
||||||
_(
|
|
||||||
msg`You are accessing Bluesky from a region that legally requires us to verify your age before allowing you to access the app.`,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
|
|
||||||
const onPressLogout = useCallback(() => {
|
const onPressLogout = useCallback(() => {
|
||||||
if (isWeb) {
|
if (isWeb) {
|
||||||
// We're switching accounts, which remounts the entire app.
|
// We're switching accounts, which remounts the entire app.
|
||||||
@@ -144,11 +138,13 @@ export function NoAccessScreen() {
|
|||||||
{isAARegion ? (
|
{isAARegion ? (
|
||||||
<>
|
<>
|
||||||
<View style={[a.gap_lg]}>
|
<View style={[a.gap_lg]}>
|
||||||
{blocks.map((block, index) => (
|
<Text style={[textStyles]}>
|
||||||
<Text key={index} style={[textStyles]}>
|
<Trans>
|
||||||
{block}
|
You are accessing Bluesky from a region that legally
|
||||||
</Text>
|
requires us to verify your age before allowing you to
|
||||||
))}
|
access the app.
|
||||||
|
</Trans>
|
||||||
|
</Text>
|
||||||
|
|
||||||
{birthdateUpdateText}
|
{birthdateUpdateText}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as aaDebug from '#/ageAssurance/debug'
|
|||||||
import {IS_DEV} from '#/env'
|
import {IS_DEV} from '#/env'
|
||||||
import {type Geolocation} from '#/geolocation/types'
|
import {type Geolocation} from '#/geolocation/types'
|
||||||
|
|
||||||
const localEnabled = false
|
const localEnabled = true
|
||||||
export const enabled = IS_DEV && (localEnabled || aaDebug.geolocation)
|
export const enabled = IS_DEV && (localEnabled || aaDebug.geolocation)
|
||||||
export const geolocation: Geolocation = aaDebug.geolocation ?? {
|
export const geolocation: Geolocation = aaDebug.geolocation ?? {
|
||||||
countryCode: 'AU',
|
countryCode: 'AU',
|
||||||
|
|||||||
Reference in New Issue
Block a user