summaryrefslogtreecommitdiffstats
path: root/src/routes/+layout.ts
diff options
context:
space:
mode:
authorGravatar amrkmn 2025-12-26 22:39:23 +0800
committerGravatar amrkmn 2025-12-26 22:39:23 +0800
commit32ca410f4edbff578d71781d943c41573912f476 (patch)
tree49f7e1e5602657d23945082fe273fc4802959a40 /src/routes/+layout.ts
Initial commitmain
Diffstat (limited to 'src/routes/+layout.ts')
-rw-r--r--src/routes/+layout.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts
new file mode 100644
index 0000000..fc5ca3f
--- /dev/null
+++ b/src/routes/+layout.ts
@@ -0,0 +1,10 @@
+import type { AppData } from '$lib/types';
+
+export const prerender = true;
+
+export const load = async ({ fetch }) => {
+ const response = await fetch('/data.json');
+ const data = (await response.json()) as AppData;
+
+ return { ...data };
+};