feat: improvements

This commit is contained in:
2024-07-08 18:43:06 +02:00
parent 21e8c291b0
commit 65a5a2517e
53 changed files with 7591 additions and 11877 deletions

View File

@@ -1,16 +1,2 @@
import type { LayoutLoad } from "./$types";
import { browser } from "$app/environment";
import { charaFileFromUriComponent } from "$lib/share/share-url";
export const prerender = true;
export const trailingSlash = "always";
export const load = (async ({ url, data, fetch }) => {
const importFile = browser && new URLSearchParams(url.search).get("import");
return {
...data,
importFile: importFile
? await charaFileFromUriComponent(importFile, fetch)
: undefined,
};
}) satisfies LayoutLoad;