tweak page title
This commit is contained in:
parent
698a553afc
commit
da3307962d
2 changed files with 10 additions and 2 deletions
10
src/App.js
10
src/App.js
|
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue