39 lines
752 B
JavaScript
39 lines
752 B
JavaScript
'use strict';
|
|
|
|
const React = require('react');
|
|
const PropTypes = require('prop-types');
|
|
|
|
const Layout = ({ children, title }) => (
|
|
<html lang="en">
|
|
<head>
|
|
{title
|
|
? <title>Porn Radar | {title}</title>
|
|
: <title>Porn Radar</title>
|
|
}
|
|
|
|
<link href="/css/style.css" rel="stylesheet" />
|
|
</head>
|
|
|
|
<body>
|
|
<header>
|
|
<h1>Porn Radar</h1>
|
|
</header>
|
|
|
|
<div className="content">
|
|
{children}
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
|
|
Layout.propTypes = {
|
|
children: PropTypes.node.isRequired,
|
|
title: PropTypes.string,
|
|
};
|
|
|
|
Layout.defaultProps = {
|
|
title: null,
|
|
};
|
|
|
|
module.exports = Layout;
|