This commit is contained in:
Eric Bailey
2024-09-05 16:42:02 -05:00
parent ae3f2015f2
commit 06878b0fcb
8 changed files with 264 additions and 92 deletions
-25
View File
@@ -1,25 +0,0 @@
import {emitGeoUpdated} from '#/state/events'
let geo: any
export async function resolveGeo() {
const req = new Promise(y => {
setTimeout(() => {
try {
geo = {country_code: 'US'}
emitGeoUpdated({geo})
} catch (e) {
} finally {
y(0)
}
}, 1000)
})
if (!geo) {
await req
}
}
export function getGeo() {
return geo
}