From 030dc63dc759d13c6f7b05ff617555fa49677421 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Tue, 31 Oct 2023 14:50:07 +0100 Subject: [PATCH] PR suggestion --- src/pages/index.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index f18f4dc4f1..5283ac17c4 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -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 <> }