2018-09-16 15:08:52 +02:00
|
|
|
import React from 'react'
|
2019-10-11 23:50:03 +02:00
|
|
|
import { Helmet } from 'react-helmet'
|
2020-03-04 22:21:12 +01:00
|
|
|
import { Post } from '../../@types/Post'
|
|
|
|
import SEO from '../atoms/SEO'
|
2018-09-16 15:08:52 +02:00
|
|
|
import styles from './Page.module.scss'
|
|
|
|
|
2019-10-02 13:35:50 +02:00
|
|
|
export default function Page({
|
|
|
|
title,
|
|
|
|
location,
|
|
|
|
section,
|
|
|
|
children,
|
|
|
|
post
|
|
|
|
}: {
|
|
|
|
title: string
|
|
|
|
children: any
|
|
|
|
section?: string
|
2019-11-08 15:31:43 +01:00
|
|
|
location: Location
|
2019-10-28 23:00:55 +01:00
|
|
|
post?: Post
|
2019-10-02 13:35:50 +02:00
|
|
|
}) {
|
2018-09-16 15:08:52 +02:00
|
|
|
return (
|
2018-11-07 01:15:41 +01:00
|
|
|
<>
|
|
|
|
<Helmet title={title} />
|
|
|
|
<SEO slug={location.pathname} postSEO post={post} />
|
|
|
|
|
2019-11-17 23:56:29 +01:00
|
|
|
<h1 className={styles.pageTitle}>{title}</h1>
|
|
|
|
{section ? <section className={section}>{children}</section> : children}
|
2018-11-07 01:15:41 +01:00
|
|
|
</>
|
2018-09-16 15:08:52 +02:00
|
|
|
)
|
|
|
|
}
|