traxxx/assets/views/layout.jsx

39 lines
737 B
React
Raw Normal View History

2019-05-08 03:50:13 +00:00
'use strict';
const React = require('react');
2019-05-17 19:59:14 +00:00
const PropTypes = require('prop-types');
2019-05-08 03:50:13 +00:00
const Header = require('./header.jsx');
2019-05-18 23:34:08 +00:00
const Layout = ({ children, title }) => (
2019-05-17 19:59:14 +00:00
<html lang="en">
<head>
2019-05-18 23:34:08 +00:00
{title
? <title>Porn Radar | {title}</title>
: <title>Porn Radar</title>
}
2019-05-08 03:50:13 +00:00
2019-05-17 19:59:14 +00:00
<link href="/css/style.css" rel="stylesheet" />
</head>
2019-05-08 03:50:13 +00:00
2019-05-17 19:59:14 +00:00
<body>
<Header />
2019-05-17 19:59:14 +00:00
<div className="content">
{children}
</div>
</body>
</html>
);
Layout.propTypes = {
children: PropTypes.node.isRequired,
2019-05-18 23:34:08 +00:00
title: PropTypes.string,
};
Layout.defaultProps = {
title: null,
2019-05-17 19:59:14 +00:00
};
2019-05-08 03:50:13 +00:00
module.exports = Layout;