mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-23 02:12:41 +00:00
feat: improvements
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user