From 18caedf7f9ddf0fac725f2167c33fa76adddf9e0 Mon Sep 17 00:00:00 2001 From: Bradley Woods Date: Wed, 26 Sep 2018 20:33:35 +1000 Subject: [PATCH] Fix layout filename --- src/components/Layout.js | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/components/Layout.js diff --git a/src/components/Layout.js b/src/components/Layout.js new file mode 100644 index 0000000..370484e --- /dev/null +++ b/src/components/Layout.js @@ -0,0 +1,71 @@ +import React from 'react' +import { Link } from 'gatsby' + +import { rhythm, scale } from '../utils/typography' + +class Layout extends React.Component { + render() { + const { location, children } = this.props + const rootPath = `${__PATH_PREFIX__}/` + let header + + if (location.pathname === rootPath) { + header = ( +

+ + Gatsby Starter Blog + +

+ ) + } else { + header = ( +

+ + Gatsby Starter Blog + +

+ ) + } + return ( +
+ {header} + {children} +
+ ) + } +} + +export default Layout