From 3c90a893904200b78601cd85d1d45ef44eb3a8a0 Mon Sep 17 00:00:00 2001 From: Heinrich Filter Date: Tue, 19 Sep 2017 09:01:18 +0200 Subject: [PATCH] Fixes #56 Make layout `pathPrefix` aware --- src/layouts/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/layouts/index.js b/src/layouts/index.js index a91dc38..fd4ae35 100644 --- a/src/layouts/index.js +++ b/src/layouts/index.js @@ -8,7 +8,13 @@ class Template extends React.Component { render() { const { location, children } = this.props let header - if (location.pathname === '/') { + + let rootPath = `/` + if (typeof __PREFIX_PATHS__ !== `undefined` && __PREFIX_PATHS__) { + rootPath = __PATH_PREFIX__ + `/` + } + + if (location.pathname === rootPath) { header = (