37 lines
796 B
TypeScript
37 lines
796 B
TypeScript
import { type ReactNode } from 'react';
|
|
import { type Metadata } from 'next';
|
|
import { getPreview } from '@/lib/preview';
|
|
import RefreshRouteOnSave from '@/components/RefreshRouteOnSave';
|
|
import EndPreview from '@/components/EndPreviewButton';
|
|
import '@/app/(app)/globals.css';
|
|
|
|
type Props = Readonly<{
|
|
children: ReactNode;
|
|
}>;
|
|
|
|
export const metadata: Metadata = {
|
|
title: {
|
|
default: '<Title>',
|
|
template: '%s | <Template>'
|
|
},
|
|
description: '<Description>',
|
|
keywords: [ '<Keyword>' ],
|
|
alternates: {
|
|
canonical: 'https://<domain>'
|
|
}
|
|
};
|
|
|
|
export default async function RootLayout({ children }: Props) {
|
|
const { isPreview } = await getPreview();
|
|
|
|
return (
|
|
<html lang="de" >
|
|
<body>
|
|
<RefreshRouteOnSave />
|
|
{children}
|
|
{isPreview && <EndPreview />}
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|