Skip to content

Commit

Permalink
Revert "Redirect index to what-is-safe server-side (#420)"
Browse files Browse the repository at this point in the history
This reverts commit 6b7fc77.
  • Loading branch information
tanay1337 authored Mar 26, 2024
1 parent 6b7fc77 commit d7286a2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { GetStaticProps } from 'next'
import { useRouter } from 'next/router'
import { useEffect } from 'react'

const RedirectIndex: React.FC = () => <></>
const RedirectIndex: React.FC = () => {
const { push } = useRouter()

export default RedirectIndex
useEffect(() => {
void push('/home/what-is-safe')
}, [push])

export const getStaticProps: GetStaticProps = async () => {
return {
redirect: {
destination: '/home/what-is-safe',
permanent: true
}
}
return <></>
}

export default RedirectIndex

0 comments on commit d7286a2

Please sign in to comment.