Use a global config for some parameters
This can later be loaded from JSON or something, but for now it just lives with the rest of the code. I'm already going to mix data with code in this repo and these values shouldn't change much, so I'm fine with that. This is my personal site after all. I'm not expecting to release this in a way for others to use.
This commit is contained in:
parent
6109bb690d
commit
4fce19a7bf
4 changed files with 26 additions and 26 deletions
10
src/App.js
10
src/App.js
|
|
@ -10,6 +10,7 @@ import 'highlight.js/styles/github-gist.css';
|
|||
|
||||
import { Container, Row, Column } from './skeleton';
|
||||
|
||||
import config from './config';
|
||||
import { Footer } from './Footer';
|
||||
import { Header } from './Header';
|
||||
import { NavList, TagNav } from './Nav';
|
||||
|
|
@ -19,17 +20,12 @@ import { Page } from './Page';
|
|||
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.title = 'Nick Pegg';
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Router>
|
||||
<ScrollToTop>
|
||||
<div className="App">
|
||||
<Header title={this.title} />
|
||||
<Header title={config.title} />
|
||||
|
||||
<Container>
|
||||
<Row>
|
||||
|
|
@ -68,7 +64,7 @@ class App extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.title = this.title;
|
||||
document.title = config.title;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue