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
f51474b6
Unverified
Commit
f51474b6
authored
Oct 10, 2022
by
Greg Bugyis
Committed by
GitHub
Oct 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [Collection Stats] update listings copy and change value to percentage (#4718)
parent
14f01905
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
CollectionStats.tsx
src/nft/components/collection/CollectionStats.tsx
+7
-4
No files found.
src/nft/components/collection/CollectionStats.tsx
View file @
f51474b6
...
...
@@ -245,7 +245,10 @@ const StatsItem = ({ children, label, isMobile }: { children: ReactNode; label:
const
StatsRow
=
({
stats
,
isMobile
,
...
props
}:
{
stats
:
GenieCollection
;
isMobile
?:
boolean
}
&
BoxProps
)
=>
{
const
numOwnersStr
=
stats
.
stats
?
putCommas
(
stats
.
stats
.
num_owners
)
:
0
const
totalSupplyStr
=
stats
.
stats
?
putCommas
(
stats
.
stats
.
total_supply
)
:
0
const
totalListingsStr
=
stats
.
stats
?
putCommas
(
stats
.
stats
.
total_listings
)
:
0
const
listedPercentageStr
=
stats
.
stats
&&
stats
.
stats
.
total_listings
>
0
?
((
stats
.
stats
.
total_listings
/
stats
.
stats
.
total_supply
)
*
100
).
toFixed
(
0
)
:
0
const
isCollectionStatsLoading
=
useIsCollectionLoading
((
state
)
=>
state
.
isCollectionStatsLoading
)
// round daily volume & floorPrice to 3 decimals or less
...
...
@@ -284,9 +287,9 @@ const StatsRow = ({ stats, isMobile, ...props }: { stats: GenieCollection; isMob
{
totalVolumeStr
}
ETH
</
StatsItem
>
)
:
null
}
{
stats
.
stats
?.
total_listings
?
(
<
StatsItem
label=
"List
ings
"
isMobile=
{
isMobile
??
false
}
>
{
totalListingsStr
}
{
stats
.
stats
?.
total_listings
&&
listedPercentageStr
>
0
?
(
<
StatsItem
label=
"List
ed
"
isMobile=
{
isMobile
??
false
}
>
{
listedPercentageStr
}
%
</
StatsItem
>
)
:
null
}
</
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