Skip to content

Commit

Permalink
fix(show-reward-tooltip): removed label state mamnagement
Browse files Browse the repository at this point in the history
  • Loading branch information
worrex committed Sep 30, 2023
1 parent 9c49079 commit 1397113
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const bondingActionText = (action: ActionType) => {
'Rewards fluctuate due to bonding activity.\nUnstable APR (depending on share, trading/flashloan volume, amp/bWHALE relation to WHALE etc.).\n' +
'Time dependent multiplier, i.e. the longer you bond the more you get.\nShown APR takes multiplier into account.'
)
default:
return ''
}
}

Expand Down
1 change: 0 additions & 1 deletion components/Pages/Dashboard/RewardsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { useRecoilValue } from 'recoil'
import { chainState } from 'state/chainState'
import { calculateRewardDurationString, nanoToMilli } from 'util/conversion'

import Loader from '../../Loader'
import { ActionType } from './BondingOverview'

const pulseAnimation = keyframes`
Expand Down
6 changes: 0 additions & 6 deletions components/Pages/Dashboard/RewardsTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export const RewardsTooltip = ({
</HStack>
)

const [isLabelOpen, setIsLabelOpen] = useState(false)

const textRef = useRef(null)
const [textWidth, setTextWidth] = useState(0)

Expand All @@ -58,9 +56,6 @@ export const RewardsTooltip = ({
border="none"
justifyContent="center"
alignItems="center"
onMouseEnter={() => setIsLabelOpen(true)}
onMouseLeave={() => setIsLabelOpen(false)}
onClick={() => setIsLabelOpen(!isLabelOpen)}
>
<TokenDetail />
<HStack justify="space-between" direction="row" width="full" px={2}>
Expand All @@ -73,7 +68,6 @@ export const RewardsTooltip = ({
) : null
} // Displaying nothing when wallet disconnected
bg="transparent"
isOpen={isLabelOpen}
>
<VStack alignItems="flex-start" minW={50}>
<Text ref={textRef} mb="-0.3rem" color="white">
Expand Down

0 comments on commit 1397113

Please sign in to comment.