1
0
Fork 0
blog/src/templates/Page.tsx

32 lines
667 B
TypeScript
Raw Normal View History

2018-09-16 15:08:52 +02:00
import React from 'react'
2018-11-07 01:15:41 +01:00
import Helmet from 'react-helmet'
import SEO from '../components/atoms/SEO'
2018-09-16 15:08:52 +02:00
import Layout from '../components/Layout'
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
location?: any
post?: any
}) {
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} />
<Layout location={location}>
<h1 className={styles.pageTitle}>{title}</h1>
{section ? <section className={section}>{children}</section> : children}
</Layout>
</>
2018-09-16 15:08:52 +02:00
)
}