069f38a313
- Added functionality to toggle dark mode based on user preferences, with state management and API integration for saving settings. - Introduced a user avatar display with initials fallback and a dropdown menu for logout and dark mode options. - Enhanced layout structure to conditionally render the header based on user authentication status.
8 lines
188 B
TypeScript
8 lines
188 B
TypeScript
import type { LayoutServerLoad } from './$types';
|
|
|
|
export const load: LayoutServerLoad = async ({ locals }) => {
|
|
return {
|
|
user: locals.user ? structuredClone(locals.user) : null
|
|
};
|
|
};
|