Skip to content

Commit 2bc4da7

Browse files
committed
Add redirects for waddendrifters
1 parent 4e3d6ff commit 2bc4da7

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

src/components/redirect.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { useEffect } from 'react'
2+
import Head from 'next/head'
3+
4+
export default function Redirect({ to }) {
5+
useEffect(() => {
6+
window.location.href = to
7+
}, [to])
8+
9+
return (
10+
<>
11+
<Head>
12+
<meta httpEquiv='refresh' content={`0;url=${to}`} />
13+
</Head>
14+
<div style={{ padding: '20px', textAlign: 'center' }}>
15+
<p>
16+
Redirecting to <a href={to}>{to}</a>...
17+
</p>
18+
</div>
19+
</>
20+
)
21+
}

src/pages/waddendrifters.html.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Redirect from '@/components/redirect'
2+
3+
export default function WadenDriftersRedirect() {
4+
return <Redirect to='/blog/waddendrifters' />
5+
}

src/pages/waddendrifters.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Redirect from '@/components/redirect'
2+
3+
export default function WadenDriftersRedirect() {
4+
return <Redirect to='/blog/waddendrifters' />
5+
}

0 commit comments

Comments
 (0)