Switch page title for different pages
This commit is contained in:
16
js/components/SetTitle.js
Normal file
16
js/components/SetTitle.js
Normal 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;
|
||||
Reference in New Issue
Block a user