2020-07-08 01:30:27 +02:00
|
|
|
import React, { ReactNode, ReactElement } from 'react'
|
2019-10-20 01:40:55 +02:00
|
|
|
import { NextSeo } from 'next-seo'
|
|
|
|
import Footer from './components/Footer'
|
|
|
|
import { title, description, url } from '../site.config'
|
2019-10-20 19:59:22 +02:00
|
|
|
import styles from './Layout.module.css'
|
2019-10-20 01:40:55 +02:00
|
|
|
|
|
|
|
export default function Layout({
|
|
|
|
children,
|
|
|
|
pageTitle = title
|
|
|
|
}: {
|
|
|
|
children: ReactNode
|
|
|
|
pageTitle?: string
|
2020-07-08 01:30:27 +02:00
|
|
|
}): ReactElement {
|
2019-10-20 01:40:55 +02:00
|
|
|
return (
|
|
|
|
<div className={styles.app}>
|
|
|
|
<NextSeo
|
|
|
|
title={pageTitle}
|
|
|
|
description={description}
|
|
|
|
canonical={url}
|
|
|
|
openGraph={{
|
|
|
|
url,
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
site_name: title
|
|
|
|
}}
|
|
|
|
twitter={{
|
|
|
|
handle: '@kremalicious',
|
2019-10-20 03:23:38 +02:00
|
|
|
site: '@kremalicious'
|
2019-10-20 01:40:55 +02:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<main className={styles.main}>{children}</main>
|
|
|
|
|
|
|
|
<Footer />
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|