This commit is contained in:
parent
54306ea870
commit
8d3643ebf1
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Metadata, Viewport } from 'next'
|
import type { Metadata, Viewport } from 'next'
|
||||||
import { Inter as FontSans } from 'next/font/google'
|
import { Inter as FontSans } from 'next/font/google'
|
||||||
import { AI } from './action' // 注意,导入的是 { AI },不是 AIProvider!
|
import { AI } from './action'
|
||||||
import '../../globals.css'
|
import '../../globals.css'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import { ThemeProvider } from '@/components/mpv2/theme-provider'
|
import { ThemeProvider } from '@/components/mpv2/theme-provider'
|
||||||
|
|
@ -39,11 +39,12 @@ export const viewport: Viewport = {
|
||||||
maximumScale: 1
|
maximumScale: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ✅ 这里类型一定要这样!不能直接 children: React.ReactNode
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children
|
children,
|
||||||
}: Readonly<{
|
}: {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
}>) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
attribute="class"
|
attribute="class"
|
||||||
|
|
@ -55,3 +56,7 @@ export default function RootLayout({
|
||||||
<AI>
|
<AI>
|
||||||
{children}
|
{children}
|
||||||
</AI>
|
</AI>
|
||||||
|
{/* <Footer /> */}
|
||||||
|
</ThemeProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue