diff options
author | Eric Bailey <git@esb.lol> | 2025-09-04 11:07:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-04 11:07:12 -0500 |
commit | f8ae0540a062e6346baf9fbf0481f769fb23a120 (patch) | |
tree | fc888e55258169e8e7246a1c099aab78fc7d9c99 /src/state/geolocation/const.ts | |
parent | 625b4e61dbf11c1d485bf8e8265df4d5af0c9657 (diff) | |
download | voidsky-f8ae0540a062e6346baf9fbf0481f769fb23a120.tar.zst |
Provide geo-gated users optional GPS fallback for precise location data (#8973)
Diffstat (limited to 'src/state/geolocation/const.ts')
-rw-r--r-- | src/state/geolocation/const.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/state/geolocation/const.ts b/src/state/geolocation/const.ts new file mode 100644 index 000000000..789d001aa --- /dev/null +++ b/src/state/geolocation/const.ts @@ -0,0 +1,30 @@ +import {type GeolocationStatus} from '#/state/geolocation/types' +import {BAPP_CONFIG_DEV_URL, IS_DEV} from '#/env' +import {type Device} from '#/storage' + +export const IPCC_URL = `https://bsky.app/ipcc` +export const BAPP_CONFIG_URL_PROD = `https://ip.bsky.app/config` +export const BAPP_CONFIG_URL = IS_DEV + ? (BAPP_CONFIG_DEV_URL ?? BAPP_CONFIG_URL_PROD) + : BAPP_CONFIG_URL_PROD +export const GEOLOCATION_CONFIG_URL = BAPP_CONFIG_URL + +/** + * Default geolocation config. + */ +export const DEFAULT_GEOLOCATION_CONFIG: Device['geolocation'] = { + countryCode: undefined, + regionCode: undefined, + ageRestrictedGeos: [], + ageBlockedGeos: [], +} + +/** + * Default geolocation status. + */ +export const DEFAULT_GEOLOCATION_STATUS: GeolocationStatus = { + countryCode: undefined, + regionCode: undefined, + isAgeRestrictedGeo: false, + isAgeBlockedGeo: false, +} |