feat(admin): enhance login form with language switcher and update script handling
- Added AdminLanguageSwitcher to the login form for improved language selection. - Replaced inline script with next/script component for better performance and safety in layout.tsx. - Updated language initialization logic to ensure consistent SSR and client rendering.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import Script from "next/script";
|
||||
|
||||
import { Providers } from "@/components/providers";
|
||||
import "./globals.css";
|
||||
@@ -37,7 +38,9 @@ export default function RootLayout({
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
>
|
||||
<head>
|
||||
<script dangerouslySetInnerHTML={{ __html: ADMIN_LOCALE_BOOTSTRAP }} />
|
||||
<Script id="admin-locale-bootstrap" strategy="beforeInteractive">
|
||||
{ADMIN_LOCALE_BOOTSTRAP}
|
||||
</Script>
|
||||
</head>
|
||||
<body className="flex min-h-full flex-col">
|
||||
<Providers>{children}</Providers>
|
||||
|
||||
Reference in New Issue
Block a user