dify/web/app/education-apply/storage.ts
2026-06-19 13:51:45 +00:00

39 lines
1.2 KiB
TypeScript

import { createLocalStorageState } from 'foxact/create-local-storage-state'
const EDUCATION_VERIFYING_LOCALSTORAGE_ITEM = 'educationVerifying'
const [
useEducationVerifying,
_useEducationVerifyingValue,
useSetEducationVerifying,
] = createLocalStorageState<string>(EDUCATION_VERIFYING_LOCALSTORAGE_ITEM, 'no', { raw: true })
const [
useEducationReverifyPrevExpireAt,
_useEducationReverifyPrevExpireAtValue,
useSetEducationReverifyPrevExpireAt,
] = createLocalStorageState<number>('education-reverify-prev-expire-at', 0)
const [
useEducationReverifyHasNoticed,
_useEducationReverifyHasNoticedValue,
useSetEducationReverifyHasNoticed,
] = createLocalStorageState<boolean>('education-reverify-has-noticed', false)
const [
useEducationExpiredHasNoticed,
_useEducationExpiredHasNoticedValue,
useSetEducationExpiredHasNoticed,
] = createLocalStorageState<boolean>('education-expired-has-noticed', false)
export {
useEducationExpiredHasNoticed,
useEducationReverifyHasNoticed,
useEducationReverifyPrevExpireAt,
useEducationVerifying,
useSetEducationExpiredHasNoticed,
useSetEducationReverifyHasNoticed,
useSetEducationReverifyPrevExpireAt,
useSetEducationVerifying,
}