rickvanlieshout.com/src/components/Layout/Layout.js
2019-05-23 07:02:34 +02:00

28 lines
689 B
JavaScript

// @flow
import React from 'react';
import Helmet from 'react-helmet';
import type { Node as ReactNode } from 'react';
import styles from './Layout.module.scss';
type Props = {
children: ReactNode,
title: string,
description?: string
};
const Layout = ({ children, title, description }: Props) => (
<div className={styles.layout}>
<Helmet>
<html lang="en" />
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:site_name" content={title} />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content={title} />
</Helmet>
{children}
</div>
);
export default Layout;