/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
examples/cms-wordpress/src/app/layout.tsx
27 строк
627 B
Bjørn Nyborg
examples: Updating WordPress example to Next 14 (#62447)
29 авг 2024, 02:09
Не верифицирован
29 авг 2024, 02:09
1207df6
Код
Авторство
О чём код?
import { draftMode } from "next/headers"; import { Inter } from "next/font/google"; import "@/app/globals.css"; import Navigation from "@/components/Globals/Navigation/Navigation"; import { PreviewNotice } from "@/components/Globals/PreviewNotice/PreviewNotice"; const inter = Inter({ subsets: ["latin"] }); export default function RootLayout({ children, }: { children: React.ReactNode; }) { const { isEnabled } = draftMode(); return ( <html lang="en"> <body className={inter.className}> {isEnabled && <PreviewNotice />} <Navigation /> {children} </body> </html> ); }