32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import type { Metadata } from 'next';
|
|
import './globals.css';
|
|
|
|
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000';
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL(siteUrl),
|
|
title: { default: 'Acme — ready-to-run app', template: '%s · Acme' },
|
|
description: 'A production-ready base app: auth, roles, payments, admin, SEO — working on day one.',
|
|
openGraph: {
|
|
type: 'website',
|
|
siteName: 'Acme',
|
|
url: '/',
|
|
title: 'Acme — ready-to-run app',
|
|
description: 'A production-ready base app: auth, roles, payments, admin, SEO.',
|
|
},
|
|
robots: { index: true, follow: true },
|
|
};
|
|
|
|
const themeScript = `try{var t=localStorage.getItem('theme');var d=t? t==='dark' : matchMedia('(prefers-color-scheme: dark)').matches;if(d)document.documentElement.classList.add('dark');}catch(e){}`;
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head>
|
|
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
|
|
</head>
|
|
<body className="min-h-screen antialiased">{children}</body>
|
|
</html>
|
|
);
|
|
}
|