Introduce "koration" duration api

This commit is contained in:
schroda
2025-10-11 00:39:44 +02:00
parent f961e734bc
commit f539afb404
19 changed files with 77 additions and 43 deletions

View File

@@ -7,11 +7,12 @@
*/
import { useCallback, useEffect, useMemo } from 'react';
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
import { d } from 'koration';
import { useLocalStorage } from '@/base/hooks/useStorage.tsx';
import { defaultPromiseErrorHandler } from '@/lib/DefaultPromiseErrorHandler.ts';
const UPDATE_CHECK_INTERVAL = 1000 * 60 * 60; // 1 hour
const UPDATE_REMINDER_THRESHOLD = 1000 * 60 * 60; // 1 hour
const UPDATE_CHECK_INTERVAL = d(1).hours.inWholeMilliseconds;
const UPDATE_REMINDER_THRESHOLD = d(1).hours.inWholeMilliseconds;
export const useUpdateChecker = (
storageKey: string,