Files
HolodoriCalc/offline/page-store.ts
T
2026-08-20 14:30:22 +09:00

12 lines
298 B
TypeScript

import { writable } from 'svelte/store';
function pageValue(pathname: string) {
return { url: new URL(pathname, 'https://offline.holodori.local'), data: {} };
}
export const page = writable(pageValue('/'));
export function setOfflinePage(pathname: string) {
page.set(pageValue(pathname));
}