v1.2.2
This commit is contained in:
12
frontend/src/routes/(app)/+layout.ts
Normal file
12
frontend/src/routes/(app)/+layout.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { LayoutLoad } from './$types';
|
||||
import { GetConfig } from "$lib/wailsjs/go/main/App";
|
||||
|
||||
export const load = (async () => {
|
||||
try {
|
||||
const config = await GetConfig();
|
||||
return { data: config, error: null };
|
||||
} catch (e) {
|
||||
console.error("Failed to load config:", e);
|
||||
return { data: null, error: 'Failed to load config' };
|
||||
}
|
||||
}) satisfies LayoutLoad;
|
||||
Reference in New Issue
Block a user