Skip to content

Commit

Permalink
fix: default tab is classic (#2449)
Browse files Browse the repository at this point in the history
  • Loading branch information
neikop authored Dec 14, 2023
1 parent 6c9d99d commit 169cb75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/ClassicElasticTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 3 additions & 2 deletions src/components/Header/groups/EarnNavGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -39,7 +40,7 @@ const EarnNavGroup = () => {
<StyledNavLink
id="pools-nav-link"
data-testid="pools-nav-link"
to={`${APP_PATHS.POOLS}/${networkInfo.route}`}
to={{ pathname: `${APP_PATHS.POOLS}/${networkInfo.route}`, search: `tab=${VERSION.CLASSIC}` }}
style={{ width: '100%' }}
>
<Flex sx={{ gap: '12px' }} alignItems="center">
Expand All @@ -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}` }}
>
<Flex sx={{ gap: '12px' }} alignItems="center">
<MoneyBag size={16} />
Expand Down

0 comments on commit 169cb75

Please sign in to comment.