Switch page title for different pages

This commit is contained in:
Tom Raithel
2017-03-21 21:30:03 +01:00
parent 3fedd01d42
commit 169bfc74ec
9 changed files with 42 additions and 9 deletions

16
js/components/SetTitle.js Normal file
View File

@@ -0,0 +1,16 @@
import React from 'react';
class SetTitle extends React.Component {
constructor(props) {
super(props);
if (typeof props.onSetTitle === 'function' && props.title) {
props.onSetTitle(props.title);
}
}
render() {
return null;
}
}
export default SetTitle;