Fixes #56 Make layout pathPrefix aware

This commit is contained in:
Heinrich Filter 2017-09-19 09:01:18 +02:00
parent 4448f72aee
commit 3c90a89390

View file

@ -8,7 +8,13 @@ class Template extends React.Component {
render() { render() {
const { location, children } = this.props const { location, children } = this.props
let header let header
if (location.pathname === '/') {
let rootPath = `/`
if (typeof __PREFIX_PATHS__ !== `undefined` && __PREFIX_PATHS__) {
rootPath = __PATH_PREFIX__ + `/`
}
if (location.pathname === rootPath) {
header = ( header = (
<h1 <h1
style={{ style={{