Skip to content

Removed location props hack now that it's been fixed in Gatbsy #10773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion www/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ exports.createPages = async ({graphql, boundActionCreators}) => {

// Blog landing page should always show the most recent blog entry.
createRedirect({
fromPath: '/blog.html',
fromPath: '/blog/',
toPath: newestBlogEntry.data.allMarkdownRemark.edges[0].node.fields.slug,
});
};
Expand Down
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"gatsby-plugin-glamor": "^1.6.4",
"gatsby-plugin-google-analytics": "^1.0.4",
"gatsby-plugin-manifest": "^1.0.4",
"gatsby-plugin-netlify": "^1.0.2",
"gatsby-plugin-netlify": "^1.0.4",
"gatsby-plugin-offline": "^1.0.4",
"gatsby-plugin-react-helmet": "^1.0.3",
"gatsby-plugin-react-next": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion www/src/components/LayoutHeader/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const Header = ({location}) => (
<HeaderLink
isActive={location.pathname.includes('/blog')}
title="Blog"
to="/blog.html"
to="/blog/"
/>
</nav>

Expand Down
8 changes: 1 addition & 7 deletions www/src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ class Template extends Component {
render() {
const {children, location} = this.props;

// HACK
// https://github.com/gatsbyjs/gatsby/issues/2180
const childrenParams = typeof window === 'undefined'
? {location}
: undefined;

// TODO - is there a better way to check if we need we have a sidebar?
let layoutHasSidebar = false;
if (location.pathname.match(/^\/(docs|tutorial|community|blog)/)) {
Expand Down Expand Up @@ -73,7 +67,7 @@ class Template extends Component {
marginTop: 40,
},
}}>
{children(childrenParams)}
{children()}
</Flex>
<Footer layoutHasSidebar={layoutHasSidebar} />
</div>
Expand Down
30 changes: 22 additions & 8 deletions www/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3297,6 +3297,14 @@ fs-extra@^4.0.1:
jsonfile "^3.0.0"
universalify "^0.1.0"

fs-extra@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-readdir-recursive@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560"
Expand Down Expand Up @@ -3374,13 +3382,13 @@ gatsby-plugin-manifest@^1.0.4:
babel-runtime "^6.26.0"
bluebird "^3.5.0"

gatsby-plugin-netlify@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/gatsby-plugin-netlify/-/gatsby-plugin-netlify-1.0.3.tgz#eaf241f181b88d75f21b023406b1918db10d4019"
gatsby-plugin-netlify@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/gatsby-plugin-netlify/-/gatsby-plugin-netlify-1.0.4.tgz#8ed9ff783f652187df9462c767518eda89147a65"
dependencies:
babel-runtime "^6.26.0"
fs-extra "^4.0.2"
lodash "^4.17.4"
pify "3.0.0"
webpack-assets-manifest "^1.0.0"

gatsby-plugin-offline@^1.0.4:
Expand Down Expand Up @@ -4884,6 +4892,12 @@ jsonfile@^3.0.0:
optionalDependencies:
graceful-fs "^4.1.6"

jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
optionalDependencies:
graceful-fs "^4.1.6"

jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
Expand Down Expand Up @@ -6244,14 +6258,14 @@ [email protected]:
hoek "2.x.x"
nigel "1.x.x"

[email protected], pify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"

pify@^2.0.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"

pify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"

pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
Expand Down