diff --git a/app/error.tsx b/app/error.tsx new file mode 100644 index 0000000..5dcf921 --- /dev/null +++ b/app/error.tsx @@ -0,0 +1,21 @@ +'use client' + +import { useEffect } from 'react' + +import { ErrorPage } from '@/components/ErrorPage' + +export interface ErrorHandlingProps { + error: Error +} + +const ErrorHandling = (props: ErrorHandlingProps): JSX.Element => { + const { error } = props + + useEffect(() => { + console.error(error) + }, [error]) + + return +} + +export default ErrorHandling diff --git a/styles/global.css b/app/globals.css similarity index 100% rename from styles/global.css rename to app/globals.css diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..1c3463d --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,71 @@ +import type { Metadata } from 'next' + +import '@fontsource/montserrat/400.css' +import '@fontsource/montserrat/600.css' +import './globals.css' + +import { Providers } from '@/components/Providers' +import { Header } from '@/components/Header' +import { Footer } from '@/components/Footer' +import { getI18n } from '@/i18n/i18n.server' + +const title = 'Théo LUDWIG' +const description = + 'Théo LUDWIG - Developer Full Stack • Open-Source enthusiast' +const image = '/images/icon-96x96.png' +const url = new URL('https://theoludwig.fr') +const locale = 'fr-FR, en-US' + +export const metadata: Metadata = { + title, + description, + metadataBase: url, + openGraph: { + title, + description, + url, + siteName: title, + images: [ + { + url: image, + width: 96, + height: 96 + } + ], + locale, + type: 'website' + }, + icons: { + icon: '/images/icon-96x96.png' + }, + twitter: { + card: 'summary', + title, + description, + images: [image] + } +} + +interface RootLayoutProps { + children: React.ReactNode +} + +const RootLayout = (props: RootLayoutProps): JSX.Element => { + const { children } = props + + const i18n = getI18n() + + return ( + + + +
+ {children} +