From c96263c9da64b90dc6c4f5cc62ebdd83ff02bb31 Mon Sep 17 00:00:00 2001 From: Joaquin Bravo Contreras Date: Thu, 8 Nov 2018 17:26:56 -0600 Subject: [PATCH] Fix issue with last PR that modified layout.js instead of Layout.js --- src/components/Layout.js | 6 ++-- src/components/layout.js | 71 ---------------------------------------- 2 files changed, 3 insertions(+), 74 deletions(-) delete mode 100644 src/components/layout.js diff --git a/src/components/Layout.js b/src/components/Layout.js index 370484e..01f7f4c 100644 --- a/src/components/Layout.js +++ b/src/components/Layout.js @@ -5,7 +5,7 @@ import { rhythm, scale } from '../utils/typography' class Layout extends React.Component { render() { - const { location, children } = this.props + const { location, title, children } = this.props const rootPath = `${__PATH_PREFIX__}/` let header @@ -26,7 +26,7 @@ class Layout extends React.Component { }} to={'/'} > - Gatsby Starter Blog + {title} ) @@ -47,7 +47,7 @@ class Layout extends React.Component { }} to={'/'} > - Gatsby Starter Blog + {title} ) diff --git a/src/components/layout.js b/src/components/layout.js deleted file mode 100644 index 01f7f4c..0000000 --- a/src/components/layout.js +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react' -import { Link } from 'gatsby' - -import { rhythm, scale } from '../utils/typography' - -class Layout extends React.Component { - render() { - const { location, title, children } = this.props - const rootPath = `${__PATH_PREFIX__}/` - let header - - if (location.pathname === rootPath) { - header = ( -

- - {title} - -

- ) - } else { - header = ( -

- - {title} - -

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