Skip to content

Commit

Permalink
Merge pull request #558 from invariant-labs/fix-duplicated-buttons
Browse files Browse the repository at this point in the history
fix duplicated buttons
  • Loading branch information
zielvna authored Jan 3, 2024
2 parents 74fe26d + 6457b98 commit 0dd4b1a
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/components/PositionDetails/PositionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,6 @@ const PositionDetails: React.FC<IProps> = ({
alignItems='flex-end'
className={classes.right}
wrap='nowrap'>
<Hidden xsDown>
<Button
className={classes.button}
variant='contained'
onClick={() => {
const parsedFee = parseFeeToPathFee(fee.v)
const address1 = addressToTicker(tokenXAddress.toString())
const address2 = addressToTicker(tokenYAddress.toString())

history.push(`/newPosition/${address1}/${address2}/${parsedFee}`)
}}>
<span className={classes.buttonText}>+ Add Liquidity</span>
</Button>
</Hidden>
<Grid
container
item
Expand All @@ -139,7 +125,11 @@ const PositionDetails: React.FC<IProps> = ({
className={classes.button}
variant='contained'
onClick={() => {
history.push('/newPosition')
const parsedFee = parseFeeToPathFee(fee.v)
const address1 = addressToTicker(tokenXAddress.toString())
const address2 = addressToTicker(tokenYAddress.toString())

history.push(`/newPosition/${address1}/${address2}/${parsedFee}`)
}}>
<span className={classes.buttonText}>+ Add Liquidity</span>
</Button>
Expand Down

0 comments on commit 0dd4b1a

Please sign in to comment.