Files
EMLy/frontend/src/routes/(app)/+layout.ts
Flavio Fois 0cda0a26fc v1.2.2
2026-02-04 19:57:31 +01:00

12 lines
395 B
TypeScript

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;