use thirty min time for region

This commit is contained in:
Pas 2025-04-17 15:19:50 -06:00
parent feb20d5ea2
commit 59e6d0de03

View file

@ -15,7 +15,8 @@ interface RegionStore {
setRegion: (region: Region) => void;
}
const TEN_DAYS_MS = 10 * 24 * 60 * 60 * 1000;
// const TEN_DAYS_MS = 10 * 24 * 60 * 60 * 1000;
const THIRTY_MINUTES_MS = 30 * 60 * 1000;
export const useRegionStore = create<RegionStore>()(
persist(
@ -50,7 +51,7 @@ export async function detectRegion(): Promise<Region> {
if (
store.region &&
store.lastChecked &&
Date.now() - store.lastChecked < TEN_DAYS_MS
Date.now() - store.lastChecked < THIRTY_MINUTES_MS
) {
return store.region;
}