57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
import type { Metadata } from 'next'
|
|
import Script from 'next/script'
|
|
import localFont from 'next/font/local'
|
|
import { Barlow } from 'next/font/google'
|
|
import './globals.css'
|
|
|
|
const geistSans = localFont({
|
|
src: './fonts/GeistVF.woff',
|
|
variable: '--font-geist-sans',
|
|
})
|
|
const geistMono = localFont({
|
|
src: './fonts/GeistMonoVF.woff',
|
|
variable: '--font-geist-mono',
|
|
})
|
|
|
|
const barlow = Barlow({
|
|
subsets: ['latin'],
|
|
weight: ['400', '500', '600', '700'],
|
|
variable: '--font-barlow',
|
|
display: 'swap',
|
|
})
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Pascal Editor',
|
|
description: 'Standalone building editor',
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode
|
|
}>) {
|
|
return (
|
|
<html lang="en" className={`${geistSans.variable} ${geistMono.variable} ${barlow.variable}`}>
|
|
<head>
|
|
{process.env.NODE_ENV === 'development' && (
|
|
<>
|
|
<Script
|
|
src="//unpkg.com/react-scan/dist/auto.global.js"
|
|
crossOrigin="anonymous"
|
|
strategy="beforeInteractive"
|
|
/>
|
|
<Script
|
|
src="//unpkg.com/react-grab/dist/index.global.js"
|
|
crossOrigin="anonymous"
|
|
strategy="beforeInteractive"
|
|
/>
|
|
</>
|
|
)}
|
|
</head>
|
|
<body className="font-sans">
|
|
{children}
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|