fix(build): Fix netlify build

pull/18095/head
Bouncey 2018-09-05 14:00:48 +01:00 committed by Stuart Taylor
parent 4c73ebbfef
commit aefb63aa7c
6 changed files with 13 additions and 10 deletions

View File

@ -1,5 +1,5 @@
{
"semi": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
}

View File

@ -1,6 +1,7 @@
module.exports = {
siteMetadata: {
title: 'Gatsby Default Starter'
title: 'freeCodeCamp',
siteUrl: 'https://www.freecodecamp.org'
},
proxy: {
prefix: '/internal',
@ -15,13 +16,13 @@ module.exports = {
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'gatsby-starter-default',
short_name: 'starter',
name: 'freeCodeCamp',
short_name: 'fCC',
start_url: '/',
background_color: '#663399',
theme_color: '#663399',
background_color: '#fff',
theme_color: '#006400',
display: 'minimal-ui',
icon: 'src/images/gatsby-icon.png' // This path is relative to the root of the site.
icon: 'src/images/square_puck.png' // This path is relative to the root of the site.
}
},
'gatsby-plugin-sitemap'

View File

@ -1,7 +1,9 @@
import { navigate } from 'gatsby';
const Redirecthome = () => {
navigate('/');
if (typeof window !== 'undefined') {
navigate('/');
}
return null;
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Router } from '@reach/router';
import Redirecthome from '../components/RedirectHome';
import RedirectHome from '../components/RedirectHome';
import ShowCertification from '../client-only-routes/ShowCertification';
import './certification.css';
@ -12,7 +12,7 @@ class Certification extends Component {
return (
<Router>
<ShowCertification path='/certification/:username/:certName' />
<Redirecthome default={true} />
<RedirectHome default={true} />
</Router>
);
}