mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-11 17:55:33 +00:00
use thirty min time for region
This commit is contained in:
parent
feb20d5ea2
commit
59e6d0de03
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue