tweak page title

This commit is contained in:
Nick Pegg 2017-10-07 14:52:40 -07:00
parent 698a553afc
commit da3307962d
2 changed files with 10 additions and 2 deletions

View file

@ -18,11 +18,16 @@ import { NotFound } from './NotFound';
class App extends Component {
constructor(props) {
super(props);
this.title = 'Nick Pegg';
}
render() {
return (
<Router>
<div className="App">
<Header />
<Header title={this.title} />
<Container>
<Row>
@ -59,8 +64,11 @@ class App extends Component {
}
componentDidMount() {
document.title = this.title;
// Auto-highlight all <pre><code> blocks
hljs.initHighlightingOnLoad();
}
}

View file

@ -7,7 +7,7 @@ class Header extends Component {
<div className="page-header">
<div className="container">
<Link to="/">
<h1>nickpegg.com</h1>
<h1>{ this.props.title }</h1>
</Link>
</div>
</div>