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
99f39989
Unverified
Commit
99f39989
authored
Nov 08, 2022
by
aballerr
Committed by
GitHub
Nov 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Several bugs on nft, see comments for clarity (#5116)
* a number of minor fixes related to nfts
parent
30fa88e3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
9 deletions
+36
-9
ActivityCells.tsx
src/nft/components/collection/ActivityCells.tsx
+2
-0
CollectionNfts.tsx
src/nft/components/collection/CollectionNfts.tsx
+25
-3
CollectionStats.tsx
src/nft/components/collection/CollectionStats.tsx
+3
-2
index.tsx
src/nft/pages/collection/index.tsx
+1
-1
scrollToTop.ts
src/nft/utils/scrollToTop.ts
+5
-3
No files found.
src/nft/components/collection/ActivityCells.tsx
View file @
99f39989
...
...
@@ -40,6 +40,8 @@ import * as styles from './Activity.css'
const
AddressLink
=
styled
(
ExternalLink
)
`
color:
${({
theme
})
=>
theme
.
textPrimary
}
;
text-decoration: none;
font-weight: 400;
line-height: 20px;
a {
color:
${({
theme
})
=>
theme
.
textPrimary
}
;
text-decoration: none;
...
...
src/nft/components/collection/CollectionNfts.tsx
View file @
99f39989
...
...
@@ -90,6 +90,22 @@ const EmptyCollectionWrapper = styled.div`
textalign: center;
`
const
ViewFullCollection
=
styled
.
span
`
&:hover {
opacity:
${({
theme
})
=>
theme
.
opacity
.
hover
}
;
}
&:active {
opacity:
${({
theme
})
=>
theme
.
opacity
.
click
}
;
}
transition:
${({
theme
:
{
transition
:
{
duration
,
timing
},
},
})
=>
`opacity
${
duration
.
medium
}
${
timing
.
ease
}
`
}
;
`
const
ClearAllButton
=
styled
.
button
`
color:
${({
theme
})
=>
theme
.
textTertiary
}
;
padding-left: 8px;
...
...
@@ -587,11 +603,17 @@ export const CollectionNfts = ({ contractAddress, collectionStats, rarityVerifie
{
hasNfts
?
(
Nfts
)
:
collectionNfts
?.
length
===
0
?
(
<
Center
width=
"full"
color=
"textSecondary"
style=
{
{
height
:
'
60vh
'
}
}
>
<
Center
width=
"full"
color=
"textSecondary"
textAlign=
"center"
style=
{
{
height
:
'
60vh
'
}
}
>
<
EmptyCollectionWrapper
>
<
p
className=
{
headlineMedium
}
>
No NFTS found
</
p
>
<
Box
className=
{
clsx
(
bodySmall
,
buttonTextMedium
)
}
color=
"blue"
cursor=
"pointer"
>
View full collection
<
Box
onClick=
{
reset
}
type=
"button"
className=
{
clsx
(
bodySmall
,
buttonTextMedium
)
}
color=
"blue"
cursor=
"pointer"
>
<
ViewFullCollection
>
View full collection
</
ViewFullCollection
>
</
Box
>
</
EmptyCollectionWrapper
>
</
Center
>
...
...
src/nft/components/collection/CollectionStats.tsx
View file @
99f39989
...
...
@@ -7,7 +7,7 @@ import { Marquee } from 'nft/components/layout/Marquee'
import
{
headlineMedium
}
from
'
nft/css/common.css
'
import
{
themeVars
}
from
'
nft/css/sprinkles.css
'
import
{
useIsCollectionLoading
}
from
'
nft/hooks/useIsCollectionLoading
'
import
{
GenieCollection
}
from
'
nft/types
'
import
{
GenieCollection
,
TokenType
}
from
'
nft/types
'
import
{
floorFormatter
,
quantityFormatter
,
roundWholePercentage
,
volumeFormatter
}
from
'
nft/utils/numbers
'
import
{
ReactNode
,
useEffect
,
useReducer
,
useRef
,
useState
}
from
'
react
'
import
ReactMarkdown
from
'
react-markdown
'
...
...
@@ -326,7 +326,8 @@ const StatsRow = ({ stats, isMobile, ...props }: { stats: GenieCollection; isMob
{
uniqueOwnersPercentage
}
%
</
StatsItem
>
)
:
null
}
{
stats
.
stats
?.
total_listings
&&
listedPercentageStr
>
0
?
(
{
stats
.
stats
?.
total_listings
&&
stats
.
standard
!==
TokenType
.
ERC1155
&&
listedPercentageStr
>
0
?
(
<
StatsItem
label=
"Listed"
shouldHide=
{
isMobile
??
false
}
>
{
listedPercentageStr
}
%
</
StatsItem
>
...
...
src/nft/pages/collection/index.tsx
View file @
99f39989
...
...
@@ -122,7 +122,7 @@ const Collection = () => {
{
(
isLoading
||
collectionStats
!==
undefined
)
&&
(
<
CollectionStats
stats=
{
collectionStats
||
({}
as
GenieCollection
)
}
isMobile=
{
isMobile
}
/>
)
}
<
div
id=
"nft-anchor"
/>
<
ActivitySwitcher
showActivity=
{
isActivityToggled
}
toggleActivity=
{
()
=>
{
...
...
src/nft/utils/scrollToTop.ts
View file @
99f39989
const
DESKTOP_OFFSET
=
420
export
const
scrollToTop
=
()
=>
window
.
scrollTo
({
top
:
DESKTOP_OFFSET
})
export
const
scrollToTop
=
()
=>
{
window
.
document
.
getElementById
(
'
nft-anchor
'
)?.
scrollIntoView
({
behavior
:
'
smooth
'
,
})
}
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