Skip to content

Commit

Permalink
PR suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Oct 31, 2023
1 parent 5d64166 commit 030dc63
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { AppRoutes } from '@/config/routes'

const IndexPage: NextPage = () => {
const router = useRouter()
const { chain } = router.query

useEffect(() => {
if (router.pathname === AppRoutes.index) {
router.replace(chain ? `${AppRoutes.welcome}?chain=${chain}` : AppRoutes.welcome)
router.replace({
pathname: AppRoutes.welcome,
query: router.query,
})
}
}, [router, chain])
}, [router])

return <></>
}
Expand Down

0 comments on commit 030dc63

Please sign in to comment.