remove debugs
This commit is contained in:
@@ -32,13 +32,6 @@ import {
|
|||||||
import {USRegionNameToRegionCode} from '#/geolocation/util'
|
import {USRegionNameToRegionCode} from '#/geolocation/util'
|
||||||
import {device, useStorage} from '#/storage'
|
import {device, useStorage} from '#/storage'
|
||||||
|
|
||||||
// DEBUG: remove before merging. Forces the card to render with a fake region
|
|
||||||
// so the RegionNotice copy can be previewed/screenshotted locally.
|
|
||||||
const DEBUG_FORCE_REGION_PREVIEW = true
|
|
||||||
// DEBUG: when previewing, set true to render the GPS copy variant instead of
|
|
||||||
// the network copy variant.
|
|
||||||
const DEBUG_FORCE_GPS = true
|
|
||||||
|
|
||||||
const USRegionCodeToRegionName: {[regionCode: string]: string} =
|
const USRegionCodeToRegionName: {[regionCode: string]: string} =
|
||||||
Object.fromEntries(
|
Object.fromEntries(
|
||||||
Object.entries(USRegionNameToRegionCode).map(([name, code]) => [
|
Object.entries(USRegionNameToRegionCode).map(([name, code]) => [
|
||||||
@@ -66,8 +59,7 @@ function formatRegion(
|
|||||||
|
|
||||||
export function AgeAssuranceAccountCard({style}: ViewStyleProp & {}) {
|
export function AgeAssuranceAccountCard({style}: ViewStyleProp & {}) {
|
||||||
const aa = useAgeAssurance()
|
const aa = useAgeAssurance()
|
||||||
if (!DEBUG_FORCE_REGION_PREVIEW && aa.state.access === aa.Access.Full)
|
if (aa.state.access === aa.Access.Full) return null
|
||||||
return null
|
|
||||||
if (aa.state.error === 'config') {
|
if (aa.state.error === 'config') {
|
||||||
return (
|
return (
|
||||||
<View style={style}>
|
<View style={style}>
|
||||||
@@ -265,12 +257,8 @@ function RegionNotice() {
|
|||||||
const computeAgeAssuranceRegionAccess = useComputeAgeAssuranceRegionAccess()
|
const computeAgeAssuranceRegionAccess = useComputeAgeAssuranceRegionAccess()
|
||||||
const locationControl = Dialog.useDialogControl()
|
const locationControl = Dialog.useDialogControl()
|
||||||
|
|
||||||
const region = DEBUG_FORCE_REGION_PREVIEW
|
const region = formatRegion(geolocation, i18n.locale)
|
||||||
? 'Switzerland'
|
const isGPS = !!deviceGeolocation?.countryCode && IS_NATIVE
|
||||||
: formatRegion(geolocation, i18n.locale)
|
|
||||||
const isGPS = DEBUG_FORCE_REGION_PREVIEW
|
|
||||||
? DEBUG_FORCE_GPS
|
|
||||||
: !!deviceGeolocation?.countryCode
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user