64 lines
1.4 KiB
TypeScript
64 lines
1.4 KiB
TypeScript
import { SerwistProvider } from '@serwist/turbopack/react'
|
|
import type { Metadata, Viewport } from 'next'
|
|
import type { ReactNode } from 'react'
|
|
import './globals.css'
|
|
|
|
const APP_NAME = 'flashcards'
|
|
const APP_DESCRIPTION = 'Application web PWA installable et utilisable hors connexion.'
|
|
const APP_TITLE_TEMPLATE = '%s · flashcards'
|
|
|
|
export const metadata: Metadata = {
|
|
applicationName: APP_NAME,
|
|
title: {
|
|
default: APP_NAME,
|
|
template: APP_TITLE_TEMPLATE,
|
|
},
|
|
description: APP_DESCRIPTION,
|
|
manifest: '/manifest.webmanifest',
|
|
appleWebApp: {
|
|
capable: true,
|
|
statusBarStyle: 'default',
|
|
title: APP_NAME,
|
|
},
|
|
formatDetection: {
|
|
telephone: false,
|
|
},
|
|
icons: {
|
|
icon: '/icon.svg',
|
|
apple: '/apple-touch-icon-180x180.png',
|
|
},
|
|
openGraph: {
|
|
type: 'website',
|
|
siteName: APP_NAME,
|
|
title: {
|
|
default: APP_NAME,
|
|
template: APP_TITLE_TEMPLATE,
|
|
},
|
|
description: APP_DESCRIPTION,
|
|
},
|
|
twitter: {
|
|
card: 'summary',
|
|
title: {
|
|
default: APP_NAME,
|
|
template: APP_TITLE_TEMPLATE,
|
|
},
|
|
description: APP_DESCRIPTION,
|
|
},
|
|
}
|
|
|
|
export const viewport: Viewport = {
|
|
themeColor: '#0f172a',
|
|
}
|
|
|
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html lang="fr">
|
|
<body>
|
|
<SerwistProvider swUrl="/serwist/sw.js" disable={process.env.NODE_ENV === 'development'}>
|
|
{children}
|
|
</SerwistProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|