From 169cb7505ee7e3b3f2da7aca2b616e8ec2780fb1 Mon Sep 17 00:00:00 2001 From: Khac Kien Date: Thu, 14 Dec 2023 10:37:57 +0700 Subject: [PATCH] fix: default tab is classic (#2449) --- src/components/ClassicElasticTab.tsx | 2 +- src/components/Header/groups/EarnNavGroup.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/ClassicElasticTab.tsx b/src/components/ClassicElasticTab.tsx index 7235f5e18c..2acf4e6b27 100644 --- a/src/components/ClassicElasticTab.tsx +++ b/src/components/ClassicElasticTab.tsx @@ -36,7 +36,7 @@ function ClassicElasticTab() { const shouldShowPositionTab = !!positions.length const params = Object.fromEntries(searchParams) - const { tab: tabQs = isMyPoolPage ? VERSION.ELASTIC : VERSION.CLASSIC, ...qs } = params + const { tab: tabQs = VERSION.ELASTIC, ...qs } = params const tab = isInEnum(tabQs, VERSION) ? tabQs : VERSION.ELASTIC const { chainId } = useActiveWeb3React() diff --git a/src/components/Header/groups/EarnNavGroup.tsx b/src/components/Header/groups/EarnNavGroup.tsx index 38b033e73c..1eb95a3d59 100644 --- a/src/components/Header/groups/EarnNavGroup.tsx +++ b/src/components/Header/groups/EarnNavGroup.tsx @@ -7,6 +7,7 @@ import { MoneyBag } from 'components/Icons' import Icon from 'components/Icons/Icon' import { TutorialIds } from 'components/Tutorial/TutorialSwap/constant' import { APP_PATHS } from 'constants/index' +import { VERSION } from 'constants/v2' import { useActiveWeb3React } from 'hooks' import useMixpanel, { MIXPANEL_TYPE } from 'hooks/useMixpanel' @@ -39,7 +40,7 @@ const EarnNavGroup = () => { @@ -54,7 +55,7 @@ const EarnNavGroup = () => { }} id="farms-nav-link" data-testid="farms-nav-link" - to={`${APP_PATHS.FARMS}/${networkInfo.route}`} + to={{ pathname: `${APP_PATHS.FARMS}/${networkInfo.route}`, search: `tab=${VERSION.CLASSIC}` }} >