2019-05-10 01:15:43 +02:00
|
|
|
// @flow
|
2018-11-09 18:08:48 +01:00
|
|
|
import React from 'react';
|
|
|
|
import Helmet from 'react-helmet';
|
2019-05-10 01:15:43 +02:00
|
|
|
import type { Node as ReactNode } from 'react';
|
2018-11-09 18:08:48 +01:00
|
|
|
import styles from './Layout.module.scss';
|
|
|
|
|
2019-05-10 01:15:43 +02:00
|
|
|
type Props = {
|
|
|
|
children: ReactNode,
|
|
|
|
title: string,
|
|
|
|
description?: string
|
|
|
|
};
|
|
|
|
|
|
|
|
const Layout = ({ children, title, description }: Props) => (
|
2018-11-09 18:08:48 +01:00
|
|
|
<div className={styles.layout}>
|
|
|
|
<Helmet>
|
2019-02-09 23:50:54 +01:00
|
|
|
<html lang="en" />
|
2018-11-09 18:08:48 +01:00
|
|
|
<title>{title}</title>
|
|
|
|
<meta name="description" content={description} />
|
2019-05-23 07:02:34 +02:00
|
|
|
<meta property="og:site_name" content={title} />
|
|
|
|
<meta name="twitter:card" content="summary" />
|
|
|
|
<meta name="twitter:title" content={title} />
|
2018-11-09 18:08:48 +01:00
|
|
|
</Helmet>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default Layout;
|