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
de71f07b
Unverified
Commit
de71f07b
authored
Jan 11, 2023
by
Charles Bachmeier
Committed by
GitHub
Jan 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: collectionNft called before intialized (#5815)
Co-authored-by:
Charles Bachmeier
<
charlie@genie.xyz
>
parent
59f9c6c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
22 deletions
+26
-22
CollectionAssetLoading.tsx
src/nft/components/collection/CollectionAssetLoading.tsx
+10
-1
CollectionNfts.tsx
src/nft/components/collection/CollectionNfts.tsx
+2
-20
shared.tsx
src/nft/components/collection/shared.tsx
+12
-0
ProfilePage.tsx
src/nft/components/profile/view/ProfilePage.tsx
+2
-1
No files found.
src/nft/components/collection/CollectionAssetLoading.tsx
View file @
de71f07b
import
{
ASSET_PAGE_SIZE
}
from
'
graphql/data/nft/Asset
'
import
{
loadingAsset
}
from
'
nft/css/loading.css
'
import
{
loadingAsset
}
from
'
nft/css/loading.css
'
import
SizingImage
from
'
../../../assets/images/sizingImage.png
'
import
SizingImage
from
'
../../../assets/images/sizingImage.png
'
...
@@ -5,7 +6,7 @@ import { Box } from '../../components/Box'
...
@@ -5,7 +6,7 @@ import { Box } from '../../components/Box'
import
{
Row
}
from
'
../Flex
'
import
{
Row
}
from
'
../Flex
'
import
*
as
styles
from
'
./CollectionAssetLoading.css
'
import
*
as
styles
from
'
./CollectionAssetLoading.css
'
export
const
CollectionAssetLoading
=
({
height
}:
{
height
?:
number
})
=>
{
const
CollectionAssetLoading
=
({
height
}:
{
height
?:
number
})
=>
{
return
(
return
(
<
Box
as=
"div"
className=
{
styles
.
collectionAssetLoading
}
>
<
Box
as=
"div"
className=
{
styles
.
collectionAssetLoading
}
>
<
Box
as=
"div"
position=
"relative"
width=
"full"
style=
{
{
height
}
}
>
<
Box
as=
"div"
position=
"relative"
width=
"full"
style=
{
{
height
}
}
>
...
@@ -21,3 +22,11 @@ export const CollectionAssetLoading = ({ height }: { height?: number }) => {
...
@@ -21,3 +22,11 @@ export const CollectionAssetLoading = ({ height }: { height?: number }) => {
</
Box
>
</
Box
>
)
)
}
}
export
const
LoadingAssets
=
({
count
,
height
}:
{
count
?:
number
;
height
?:
number
})
=>
(
<>
{
Array
.
from
(
Array
(
count
??
ASSET_PAGE_SIZE
),
(
_
,
index
)
=>
(
<
CollectionAssetLoading
key=
{
index
}
height=
{
height
}
/>
))
}
</>
)
src/nft/components/collection/CollectionNfts.tsx
View file @
de71f07b
...
@@ -55,8 +55,9 @@ import { useLocation } from 'react-router-dom'
...
@@ -55,8 +55,9 @@ import { useLocation } from 'react-router-dom'
import
styled
,
{
css
}
from
'
styled-components/macro
'
import
styled
,
{
css
}
from
'
styled-components/macro
'
import
{
ThemedText
}
from
'
theme
'
import
{
ThemedText
}
from
'
theme
'
import
{
CollectionAssetLoading
}
from
'
./CollectionAssetLoading
'
import
{
LoadingAssets
}
from
'
./CollectionAssetLoading
'
import
{
MARKETPLACE_ITEMS
,
MarketplaceLogo
}
from
'
./MarketplaceSelect
'
import
{
MARKETPLACE_ITEMS
,
MarketplaceLogo
}
from
'
./MarketplaceSelect
'
import
{
ClearAllButton
}
from
'
./shared
'
import
{
Sweep
}
from
'
./Sweep
'
import
{
Sweep
}
from
'
./Sweep
'
import
{
TraitChip
}
from
'
./TraitChip
'
import
{
TraitChip
}
from
'
./TraitChip
'
...
@@ -120,17 +121,6 @@ const ViewFullCollection = styled.span`
...
@@ -120,17 +121,6 @@ const ViewFullCollection = styled.span`
${
OpacityHoverState
}
${
OpacityHoverState
}
`
`
export
const
ClearAllButton
=
styled
.
button
`
color:
${({
theme
})
=>
theme
.
textTertiary
}
;
padding-left: 8px;
padding-right: 8px;
font-size: 14px;
font-weight: 600;
border: none;
cursor: pointer;
background: none;
`
const
InfiniteScrollWrapper
=
styled
.
div
`
const
InfiniteScrollWrapper
=
styled
.
div
`
${
InfiniteScrollWrapperCss
}
${
InfiniteScrollWrapperCss
}
`
`
...
@@ -172,14 +162,6 @@ const MarketNameWrapper = styled(Row)`
...
@@ -172,14 +162,6 @@ const MarketNameWrapper = styled(Row)`
gap: 8px;
gap: 8px;
`
`
export
const
LoadingAssets
=
({
count
,
height
}:
{
count
?:
number
;
height
?:
number
})
=>
(
<>
{
Array
.
from
(
Array
(
count
??
ASSET_PAGE_SIZE
),
(
_
,
index
)
=>
(
<
CollectionAssetLoading
key=
{
index
}
height=
{
height
}
/>
))
}
</>
)
const
CollectionNftsLoading
=
({
height
}:
{
height
?:
number
})
=>
(
const
CollectionNftsLoading
=
({
height
}:
{
height
?:
number
})
=>
(
<
Box
width=
"full"
className=
{
styles
.
assetList
}
>
<
Box
width=
"full"
className=
{
styles
.
assetList
}
>
<
LoadingAssets
height=
{
height
}
/>
<
LoadingAssets
height=
{
height
}
/>
...
...
src/nft/components/collection/shared.tsx
0 → 100644
View file @
de71f07b
import
styled
from
'
styled-components/macro
'
export
const
ClearAllButton
=
styled
.
button
`
color:
${({
theme
})
=>
theme
.
textTertiary
}
;
padding-left: 8px;
padding-right: 8px;
font-size: 14px;
font-weight: 600;
border: none;
cursor: pointer;
background: none;
`
src/nft/components/profile/view/ProfilePage.tsx
View file @
de71f07b
import
{
useNftBalance
}
from
'
graphql/data/nft/NftBalance
'
import
{
useNftBalance
}
from
'
graphql/data/nft/NftBalance
'
import
{
AnimatedBox
,
Box
}
from
'
nft/components/Box
'
import
{
AnimatedBox
,
Box
}
from
'
nft/components/Box
'
import
{
ClearAllButton
,
LoadingAssets
}
from
'
nft/components/collection/CollectionNfts
'
import
{
LoadingAssets
}
from
'
nft/components/collection/CollectionAssetLoading
'
import
{
assetList
}
from
'
nft/components/collection/CollectionNfts.css
'
import
{
assetList
}
from
'
nft/components/collection/CollectionNfts.css
'
import
{
FilterButton
}
from
'
nft/components/collection/FilterButton
'
import
{
FilterButton
}
from
'
nft/components/collection/FilterButton
'
import
{
ClearAllButton
}
from
'
nft/components/collection/shared
'
import
{
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
CrossIcon
}
from
'
nft/components/icons
'
import
{
CrossIcon
}
from
'
nft/components/icons
'
import
{
FilterSidebar
}
from
'
nft/components/profile/view/FilterSidebar
'
import
{
FilterSidebar
}
from
'
nft/components/profile/view/FilterSidebar
'
...
...
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