Skip to content

Commit

Permalink
add pool explorer button & my position button to position detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
tienkane committed Dec 30, 2024
1 parent cc15e99 commit b19a038
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/pages/Earns/PositionDetail/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { t } from '@lingui/macro'
import { useEffect, useMemo, useRef } from 'react'
import { useParams } from 'react-router-dom'
import { Flex, Text } from 'rebass'
import { useUserPositionsQuery } from 'services/zapEarn'

import { ReactComponent as IconEarnNotFound } from 'assets/svg/ic_earn_not_found.svg'
import { ReactComponent as IconUserEarnPosition } from 'assets/svg/ic_user_earn_position.svg'
import { ReactComponent as RocketIcon } from 'assets/svg/rocket.svg'
import LocalLoader from 'components/LocalLoader'
import { APP_PATHS } from 'constants/index'
import { useActiveWeb3React } from 'hooks'

import { NavigateButton } from '../PoolExplorer/styles'
import { EmptyPositionText, PositionPageWrapper } from '../UserPositions/styles'
import useLiquidityWidget from '../useLiquidityWidget'
import PositionDetailHeader from './Header'
Expand Down Expand Up @@ -147,7 +152,15 @@ const PositionDetail = () => {
) : (
<EmptyPositionText>
<IconEarnNotFound />
{t`No position found!`}
<Text>{t`No position found!`}</Text>
<Flex sx={{ gap: 2 }} marginTop={12}>
<NavigateButton
icon={<RocketIcon width={20} height={20} />}
text={t`Explorer Pools`}
to={APP_PATHS.EARN_POOLS}
/>
<NavigateButton icon={<IconUserEarnPosition />} text={t`My Positions`} to={APP_PATHS.EARN_POSITIONS} />
</Flex>
</EmptyPositionText>
)}
</PositionPageWrapper>
Expand Down

0 comments on commit b19a038

Please sign in to comment.