Make document titles work

This commit is contained in:
Berkeley Martinez
2016-01-03 19:40:49 -08:00
parent 30826d9ecb
commit ea574d721e
3 changed files with 15 additions and 16 deletions

View File

@@ -25,22 +25,6 @@ export default contain(
username: PropTypes.string
},
componentDidMount() {
const title = this.props.title;
this.setTitle(title);
},
componentWillReceiveProps(nextProps) {
if (nextProps.title !== this.props.title) {
this.setTitle(nextProps.title);
}
},
setTitle(title) {
const doc = typeof document !== 'undefined' ? document : {};
doc.title = title;
},
render() {
const { username, points, picture } = this.props;
const navProps = { username, points, picture };