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

View file

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