This commit is contained in:
parent
aea9cb2cdd
commit
61f2a8f8fb
|
|
@ -8,8 +8,7 @@
|
|||
],
|
||||
"plugins": ["tailwindcss"],
|
||||
"rules": {
|
||||
"tailwindcss/no-custom-classname": "off",
|
||||
"@next/next/no-sync-scripts": "warn" // 添加此行来启用该规则
|
||||
"tailwindcss/no-custom-classname": "off"
|
||||
},
|
||||
"settings": {
|
||||
"tailwindcss": {
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ export default function WorkspaceLayout({ children }: WorkspaceLayoutProps) {
|
|||
|
||||
const params = useParams()
|
||||
const searchParams = useSearchParams()
|
||||
//const workspaceId = params.workspaceid as string
|
||||
const workspaceId = params ? params.workspaceid : null;
|
||||
const workspaceId = params.workspaceid as string
|
||||
|
||||
const {
|
||||
setChatSettings,
|
||||
|
|
|
|||
|
|
@ -122,38 +122,38 @@ export default async function RootLayout({
|
|||
|
||||
//console.log("[layout.tsx]..............current locale: ", {locale});
|
||||
|
||||
// return (
|
||||
// <html lang="en" suppressHydrationWarning>
|
||||
// <body className={inter.className}>
|
||||
// <Providers attribute="class" defaultTheme="dark">
|
||||
// <TranslationsProvider
|
||||
// namespaces={i18nNamespaces}
|
||||
// locale={locale}
|
||||
// resources={resources}
|
||||
// >
|
||||
// <Toaster richColors position="top-center" duration={3000} />
|
||||
// <div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
||||
// {data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||
// </div>
|
||||
// </TranslationsProvider>
|
||||
// </Providers>
|
||||
// </body>
|
||||
// </html>
|
||||
// )
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body className={inter.className}>
|
||||
<Providers attribute="class" defaultTheme="dark">
|
||||
<TranslationsProvider
|
||||
namespaces={i18nNamespaces}
|
||||
locale={locale}
|
||||
resources={resources}
|
||||
>
|
||||
<Toaster richColors position="top-center" duration={3000} />
|
||||
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
||||
{data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||
</div>
|
||||
</TranslationsProvider>
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
|
||||
return (
|
||||
<Providers attribute="class" defaultTheme="dark">
|
||||
<TranslationsProvider
|
||||
namespaces={i18nNamespaces}
|
||||
locale={locale}
|
||||
resources={resources}
|
||||
>
|
||||
<Toaster richColors position="top-center" duration={3000} />
|
||||
<div className={`${inter.className} bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto`}>
|
||||
{data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||
</div>
|
||||
</TranslationsProvider>
|
||||
</Providers>
|
||||
)
|
||||
// return (
|
||||
// <Providers attribute="class" defaultTheme="dark">
|
||||
// <TranslationsProvider
|
||||
// namespaces={i18nNamespaces}
|
||||
// locale={locale}
|
||||
// resources={resources}
|
||||
// >
|
||||
// <Toaster richColors position="top-center" duration={3000} />
|
||||
// <div className={`${inter.className} bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto`}>
|
||||
// {data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||
// </div>
|
||||
// </TranslationsProvider>
|
||||
// </Providers>
|
||||
// )
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
/* eslint-disable @next/next/no-sync-scripts */
|
||||
import { Html, Head, Main, NextScript } from "next/document";
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head>
|
||||
{/* 使用 defer 确保 env.js 加载顺序 */}
|
||||
<script src="/env.js" defer />
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in New Issue