fix bug#7
Build & Push / Build & Push Docker Image (push) Failing after 2m50s
Test / Type Check (all packages) (push) Failing after 55s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped

This commit is contained in:
root
2026-07-20 01:01:21 -04:00
parent 7ce0a5adf3
commit fb7b4eefc1
33 changed files with 342 additions and 87 deletions
+4 -4
View File
@@ -20,6 +20,7 @@ import {
} from '@/lib/theme/config';
import { cookies, headers } from 'next/headers';
import { notFound } from 'next/navigation';
import Script from 'next/script';
import type { Metadata } from 'next';
import type { ReactNode } from 'react';
@@ -46,7 +47,6 @@ export default async function LocaleLayout({ children, params }: LocaleLayoutPro
const messages = getMessages(locale);
const integrationConfig = getPublicIntegrationConfig();
const requestHeaders = await headers();
const nonce = requestHeaders.get('x-nonce') ?? undefined;
const cookieStore = await cookies();
const headerPreference = requestHeaders.get('x-theme-preference');
const cookiePreference = cookieStore.get(themeCookie)?.value;
@@ -54,7 +54,7 @@ export default async function LocaleLayout({ children, params }: LocaleLayoutPro
? headerPreference
: isThemePreference(cookiePreference)
? cookiePreference
: 'system';
: 'dark';
const resolvedTheme = serverResolvedTheme(preference);
return (
@@ -67,9 +67,9 @@ export default async function LocaleLayout({ children, params }: LocaleLayoutPro
suppressHydrationWarning
>
<head>
<script
<Script
id="theme-bootstrap"
nonce={nonce || undefined}
strategy="beforeInteractive"
suppressHydrationWarning
dangerouslySetInnerHTML={{ __html: themeBootstrapScript }}
/>