Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
21ee680d
Unverified
Commit
21ee680d
authored
Oct 25, 2022
by
Jordan Frankfurt
Committed by
GitHub
Oct 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bag row item usd price alignment (#4996)
parent
627af508
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
BagRow.tsx
src/nft/components/bag/BagRow.tsx
+11
-14
No files found.
src/nft/components/bag/BagRow.tsx
View file @
21ee680d
...
@@ -62,6 +62,13 @@ export const BagRow = ({ asset, usdPrice, removeAsset, showRemove, grayscale, is
...
@@ -62,6 +62,13 @@ export const BagRow = ({ asset, usdPrice, removeAsset, showRemove, grayscale, is
if
(
cardHovered
&&
assetCardRef
.
current
&&
assetCardRef
.
current
.
matches
(
'
:hover
'
)
===
false
)
setCardHovered
(
false
)
if
(
cardHovered
&&
assetCardRef
.
current
&&
assetCardRef
.
current
.
matches
(
'
:hover
'
)
===
false
)
setCardHovered
(
false
)
const
assetEthPrice
=
asset
.
updatedPriceInfo
?
asset
.
updatedPriceInfo
.
ETHPrice
:
asset
.
priceInfo
.
ETHPrice
const
assetEthPriceFormatted
=
formatWeiToDecimal
(
assetEthPrice
)
const
assetUSDPriceFormatted
=
ethNumberStandardFormatter
(
usdPrice
?
parseFloat
(
formatEther
(
assetEthPrice
))
*
usdPrice
:
usdPrice
,
true
)
return
(
return
(
<
Link
to=
{
getAssetHref
(
asset
)
}
style=
{
{
textDecoration
:
'
none
'
}
}
>
<
Link
to=
{
getAssetHref
(
asset
)
}
style=
{
{
textDecoration
:
'
none
'
}
}
>
<
Row
ref=
{
assetCardRef
}
className=
{
styles
.
bagRow
}
onMouseEnter=
{
handleCardHover
}
onMouseLeave=
{
handleCardHover
}
>
<
Row
ref=
{
assetCardRef
}
className=
{
styles
.
bagRow
}
onMouseEnter=
{
handleCardHover
}
onMouseLeave=
{
handleCardHover
}
>
...
@@ -120,22 +127,12 @@ export const BagRow = ({ asset, usdPrice, removeAsset, showRemove, grayscale, is
...
@@ -120,22 +127,12 @@ export const BagRow = ({ asset, usdPrice, removeAsset, showRemove, grayscale, is
</
Box
>
</
Box
>
)
}
)
}
{
(
!
showRemoveButton
||
isMobile
)
&&
(
{
(
!
showRemoveButton
||
isMobile
)
&&
(
<
Column
flexShrink=
"0"
>
<
Column
flexShrink=
"0"
alignItems=
"flex-end"
>
<
Box
className=
{
styles
.
bagRowPrice
}
>
<
Box
className=
{
styles
.
bagRowPrice
}
>
{
`${formatWeiToDecimal(
{
assetEthPriceFormatted
}
asset.updatedPriceInfo ? asset.updatedPriceInfo.ETHPrice : asset.priceInfo.ETHPrice
ETH
)} ETH`
}
</
Box
>
<
Box
className=
{
styles
.
collectionName
}
>
{
`${ethNumberStandardFormatter(
usdPrice
? parseFloat(
formatEther(asset.updatedPriceInfo ? asset.updatedPriceInfo.ETHPrice : asset.priceInfo.ETHPrice)
) * usdPrice
: usdPrice,
true
)}`
}
</
Box
>
</
Box
>
<
Box
className=
{
styles
.
collectionName
}
>
{
assetUSDPriceFormatted
}
</
Box
>
</
Column
>
</
Column
>
)
}
)
}
</
Row
>
</
Row
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment