🐛 add env to useDb and apply prettier
tinyedge/deploy Deployed by TinyEdge

This commit is contained in:
2026-08-07 13:28:26 +02:00
parent 67727f96ab
commit cbe1b42f6e
54 changed files with 5492 additions and 2406 deletions
+10 -7
View File
@@ -1,17 +1,20 @@
import { readCachedPaymentLink, writeCachedPaymentLink } from '../utils/paymentLinkCache'
import {
readCachedPaymentLink,
writeCachedPaymentLink,
} from '../utils/paymentLinkCache';
export function usePaymentLinkCache() {
const lastLink = useState<string | null>('payment-link-cache', () => null)
const lastLink = useState<string | null>('payment-link-cache', () => null);
if (import.meta.client && lastLink.value === null) {
lastLink.value = readCachedPaymentLink(window.localStorage)
lastLink.value = readCachedPaymentLink(window.localStorage);
}
function rememberLink(link: string) {
if (!import.meta.client || !link) return
lastLink.value = link
writeCachedPaymentLink(window.localStorage, link)
if (!import.meta.client || !link) return;
lastLink.value = link;
writeCachedPaymentLink(window.localStorage, link);
}
return { lastLink, rememberLink }
return { lastLink, rememberLink };
}