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
ca1dc593
Unverified
Commit
ca1dc593
authored
Dec 02, 2022
by
Jack Short
Committed by
GitHub
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: updating page loader for activity (#5508)
* style: updating page loader for activity * reusing loader
parent
afacc4a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
30 deletions
+37
-30
Activity.tsx
src/nft/components/collection/Activity.tsx
+3
-10
ActivityLoader.tsx
src/nft/components/collection/ActivityLoader.tsx
+34
-20
No files found.
src/nft/components/collection/Activity.tsx
View file @
ca1dc593
import
{
OpacityHoverState
}
from
'
components/Common
'
import
{
Box
}
from
'
nft/components/Box
'
import
{
LoadingSparkle
}
from
'
nft/components/common/Loading/LoadingSparkle
'
import
{
Center
,
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
Column
,
Row
}
from
'
nft/components/Flex
'
import
{
themeVars
,
vars
}
from
'
nft/css/sprinkles.css
'
import
{
useBag
,
useIsMobile
}
from
'
nft/hooks
'
import
{
ActivityFetcher
}
from
'
nft/queries/genie/ActivityFetcher
'
...
...
@@ -15,7 +14,7 @@ import styled from 'styled-components/macro'
import
*
as
styles
from
'
./Activity.css
'
import
{
AddressCell
,
BuyCell
,
EventCell
,
ItemCell
,
PriceCell
}
from
'
./ActivityCells
'
import
{
ActivityLoader
}
from
'
./ActivityLoader
'
import
{
ActivityLoader
,
ActivityPageLoader
}
from
'
./ActivityLoader
'
enum
ColumnHeaders
{
Item
=
'
Item
'
,
...
...
@@ -155,13 +154,7 @@ export const Activity = ({ contractAddress, rarityVerified, collectionName, chai
<
InfiniteScroll
next=
{
fetchNextPage
}
hasMore=
{
!!
hasNextPage
}
loader=
{
isFetchingNextPage
?
(
<
Center
paddingY=
"20"
>
<
LoadingSparkle
/>
</
Center
>
)
:
null
}
loader=
{
isFetchingNextPage
?
<
ActivityPageLoader
rowCount=
{
2
}
/>
:
null
}
dataLength=
{
events
?.
length
??
0
}
style=
{
{
overflow
:
'
unset
'
}
}
>
...
...
src/nft/components/collection/ActivityLoader.tsx
View file @
ca1dc593
...
...
@@ -13,30 +13,44 @@ const LoadingSliver = () => {
return
<
Box
className=
{
styles
.
loadingSliver
}
/>
}
const
ActivityLoadingRow
=
()
=>
{
return
(
<
Box
as=
"a"
className=
{
eventRow
}
>
<
Row
gap=
"16"
>
<
LoadingSquare
/>
<
LoadingSliver
/>
</
Row
>
<
Row
>
<
LoadingSliver
/>
</
Row
>
<
Row
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
>
<
LoadingSliver
/>
</
Row
>
<
Row
display=
{
{
sm
:
'
none
'
,
lg
:
'
flex
'
}
}
>
<
LoadingSliver
/>
</
Row
>
<
Row
display=
{
{
sm
:
'
none
'
,
xl
:
'
flex
'
}
}
>
<
LoadingSliver
/>
</
Row
>
</
Box
>
)
}
export
const
ActivityPageLoader
=
({
rowCount
}:
{
rowCount
:
number
})
=>
{
return
(
<>
{
[...
Array
(
rowCount
)].
map
((
_
,
index
)
=>
(
<
ActivityLoadingRow
key=
{
index
}
/>
))
}
</>
)
}
export
const
ActivityLoader
=
()
=>
{
return
(
<
Column
marginTop=
"36"
>
<
HeaderRow
/>
{
[...
Array
(
10
)].
map
((
_
,
i
)
=>
(
<
Box
as=
"a"
className=
{
eventRow
}
key=
{
i
}
>
<
Row
gap=
"16"
>
<
LoadingSquare
/>
<
LoadingSliver
/>
</
Row
>
<
Row
>
<
LoadingSliver
/>
</
Row
>
<
Row
display=
{
{
sm
:
'
none
'
,
md
:
'
flex
'
}
}
>
<
LoadingSliver
/>
</
Row
>
<
Row
display=
{
{
sm
:
'
none
'
,
lg
:
'
flex
'
}
}
>
<
LoadingSliver
/>
</
Row
>
<
Row
display=
{
{
sm
:
'
none
'
,
xl
:
'
flex
'
}
}
>
<
LoadingSliver
/>
</
Row
>
</
Box
>
))
}
<
ActivityPageLoader
rowCount=
{
10
}
/>
</
Column
>
)
}
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