2019-11-28 14:12:48 +01:00
|
|
|
import React from 'react';
|
2019-12-01 22:12:13 +01:00
|
|
|
import { Navbar } from './Navbar';
|
2019-11-28 14:12:48 +01:00
|
|
|
|
2019-12-05 22:37:09 +01:00
|
|
|
export class Page extends React.PureComponent {
|
2019-11-28 14:12:48 +01:00
|
|
|
render() {
|
|
|
|
return (
|
2019-12-01 22:12:13 +01:00
|
|
|
<React.Fragment>
|
|
|
|
<Navbar />
|
|
|
|
{this.props.children}
|
|
|
|
</React.Fragment>
|
2019-11-28 14:12:48 +01:00
|
|
|
);
|
|
|
|
}
|
2019-12-05 22:46:07 +01:00
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
this.updateTitle();
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidUpdate() {
|
|
|
|
this.updateTitle();
|
|
|
|
}
|
|
|
|
|
|
|
|
updateTitle() {
|
|
|
|
const { title } = this.props;
|
|
|
|
if (title !== undefined) window.document.title = title;
|
|
|
|
}
|
2019-11-28 14:12:48 +01:00
|
|
|
}
|