Mejora de fromts

This commit is contained in:
2026-03-03 11:25:37 -07:00
parent 49dfb3ef24
commit f10b15d91b
19 changed files with 180 additions and 2115 deletions

View File

@@ -0,0 +1,7 @@
import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = ({ locals }) => {
return {
user: locals.user ?? null
};
};

View File

@@ -9,10 +9,14 @@
import { browser } from '$app/environment';
import '../app.css';
export let data;
let mounted = false;
onMount(async () => {
await auth.init();
onMount(() => {
if (data.user && !$auth.isAuthenticated) {
auth.setUser(data.user);
}
mounted = true;
});