Files
splitt-the-bill/app/utils/paymentLinkCache.ts
T
2026-07-01 15:43:18 +02:00

12 lines
350 B
TypeScript

const STORAGE_KEY = 'stb:last-payment-link'
type StorageLike = Pick<Storage, 'getItem' | 'setItem'>
export function readCachedPaymentLink(storage: StorageLike): string | null {
return storage.getItem(STORAGE_KEY) || null
}
export function writeCachedPaymentLink(storage: StorageLike, link: string): void {
storage.setItem(STORAGE_KEY, link)
}