fix(build): Fix netlify build

This commit is contained in:
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,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>
);
}