bugfixing mode-watcher
This commit is contained in:
parent
2f9f9c8934
commit
94c9f848fc
@ -13,7 +13,7 @@
|
||||
<!-- Global background color -->
|
||||
<body
|
||||
data-sveltekit-preload-data="hover"
|
||||
class=" overflow-x-hidden"
|
||||
class="overflow-x-hidden"
|
||||
>
|
||||
<div>%sveltekit.body%</div>
|
||||
</body>
|
||||
|
||||
@ -10,7 +10,7 @@ export const handle = sequence(async ({ event, resolve }) => {
|
||||
const fastifyURL = import.meta.env.VITE_USEAST_FASTIFY_URL;
|
||||
const wsURL = import.meta.env.VITE_USEAST_WS_URL;
|
||||
|
||||
const themeMode = event?.cookies?.get("theme-mode");
|
||||
const themeMode = event?.cookies?.get("theme-mode") || "dark";
|
||||
|
||||
|
||||
event.locals = {
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
|
||||
export let data;
|
||||
|
||||
console.log(data?.themeMode, $mode)
|
||||
|
||||
let hideHeader = false;
|
||||
BProgress.configure({
|
||||
showSpinner: false,
|
||||
@ -1228,14 +1228,10 @@
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<main class="w-full overflow-y-auto sm:p-4">
|
||||
<!--
|
||||
<button on:click={handleNotificationClick}>
|
||||
Send Notification
|
||||
</button>
|
||||
-->
|
||||
|
||||
|
||||
<slot />
|
||||
<ModeWatcher defaultMode={data?.themeMode} disableTransitions={false}/>
|
||||
<ModeWatcher defaultMode={data?.themeMode} disableTransitions={true}/>
|
||||
<Toaster position="top-center" />
|
||||
{#if Cookie && $showCookieConsent === true}
|
||||
<Cookie />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user