Add geo prop

This commit is contained in:
Eric Bailey
2025-06-25 16:52:21 -05:00
parent b76f95c9bd
commit 43d0c73d32
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -25,6 +25,7 @@ const onGeolocationUpdate = (
*/
export const DEFAULT_GEOLOCATION: Device['geolocation'] = {
countryCode: undefined,
isAgeRestrictedGeo: false,
}
async function getGeolocation(): Promise<Device['geolocation']> {
@@ -39,6 +40,7 @@ async function getGeolocation(): Promise<Device['geolocation']> {
if (json.countryCode) {
return {
countryCode: json.countryCode,
isAgeRestrictedGeo: json.isAgeRestrictedGeo ?? false,
}
} else {
return undefined
+1
View File
@@ -7,6 +7,7 @@ export type Device = {
lastNuxDialog: string | undefined
geolocation?: {
countryCode: string | undefined
isAgeRestrictedGeo: boolean
}
trendingBetaEnabled: boolean
devMode: boolean