Skip to content

Commit 4081854

Browse files
committed
Update 404
1 parent cdecf60 commit 4081854

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/components/layout.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ function Layout({ pageTitle, children }: { pageTitle?: string; children: ReactNo
4848

4949
return (
5050
<Container $isMain={!pageTitle}>
51-
<script
52-
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5121982141414734'
53-
crossOrigin='anonymous'
54-
async
55-
></script>
5651
<GlobalStyle />
5752
<title>
5853
{data.site.siteMetadata.title}

src/html.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function HTML(props) {
1616
<script
1717
async
1818
src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5121982141414734'
19-
crossorigin='anonymous'
19+
crossOrigin='anonymous'
2020
></script>
2121
{props.headComponents}
2222
</head>

src/pages/404.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { navigate } from '@gatsbyjs/reach-router';
1+
import { useEffect } from 'react';
22

33
function NotFoundPage() {
4-
navigate('/');
4+
useEffect(() => {
5+
window.location.replace('/');
6+
}, []);
57

68
return null;
79
}

0 commit comments

Comments
 (0)