immich/web/src/routes/+layout.ts
Min Idzelis b2dd5a3152
feat: loading screen, initSDK on bootstrap, fix FOUC for theme (#10350)
* feat: loading screen, initSDK on bootstrap, fix FOUC for theme

* pulsate immich logo, don't set localstorage

* Make it spin

* Rework error handling a bit

* Cleanup

* fix test

* rename, memoize

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2024-08-25 17:34:08 -05:00

22 lines
373 B
TypeScript

import { init } from '$lib/utils/server';
import type { LayoutLoad } from './$types';
export const ssr = false;
export const csr = true;
export const load = (async ({ fetch }) => {
let error;
try {
await init(fetch);
} catch (initError) {
error = initError;
}
return {
error,
meta: {
title: 'Immich',
},
};
}) satisfies LayoutLoad;