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