Add geo prop
This commit is contained in:
@@ -25,6 +25,7 @@ const onGeolocationUpdate = (
|
|||||||
*/
|
*/
|
||||||
export const DEFAULT_GEOLOCATION: Device['geolocation'] = {
|
export const DEFAULT_GEOLOCATION: Device['geolocation'] = {
|
||||||
countryCode: undefined,
|
countryCode: undefined,
|
||||||
|
isAgeRestrictedGeo: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getGeolocation(): Promise<Device['geolocation']> {
|
async function getGeolocation(): Promise<Device['geolocation']> {
|
||||||
@@ -39,6 +40,7 @@ async function getGeolocation(): Promise<Device['geolocation']> {
|
|||||||
if (json.countryCode) {
|
if (json.countryCode) {
|
||||||
return {
|
return {
|
||||||
countryCode: json.countryCode,
|
countryCode: json.countryCode,
|
||||||
|
isAgeRestrictedGeo: json.isAgeRestrictedGeo ?? false,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return undefined
|
return undefined
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export type Device = {
|
|||||||
lastNuxDialog: string | undefined
|
lastNuxDialog: string | undefined
|
||||||
geolocation?: {
|
geolocation?: {
|
||||||
countryCode: string | undefined
|
countryCode: string | undefined
|
||||||
|
isAgeRestrictedGeo: boolean
|
||||||
}
|
}
|
||||||
trendingBetaEnabled: boolean
|
trendingBetaEnabled: boolean
|
||||||
devMode: boolean
|
devMode: boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user