Erste brauchbare Version
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user