Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
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
vicotor
frontend
Commits
8e14571e
Commit
8e14571e
authored
Dec 12, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skeletons
parent
bd1e76f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
AddressCoinBalanceHistory.tsx
ui/address/coinBalance/AddressCoinBalanceHistory.tsx
+13
-2
AddressCoinBalanceSkeletonMobile.tsx
ui/address/coinBalance/AddressCoinBalanceSkeletonMobile.tsx
+43
-0
No files found.
ui/address/coinBalance/AddressCoinBalanceHistory.tsx
View file @
8e14571e
...
@@ -10,9 +10,11 @@ import useQueryWithPages from 'lib/hooks/useQueryWithPages';
...
@@ -10,9 +10,11 @@ import useQueryWithPages from 'lib/hooks/useQueryWithPages';
import
ActionBar
from
'
ui/shared/ActionBar
'
;
import
ActionBar
from
'
ui/shared/ActionBar
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
Pagination
from
'
ui/shared/Pagination
'
;
import
Pagination
from
'
ui/shared/Pagination
'
;
import
SkeletonTable
from
'
ui/shared/SkeletonTable
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
{
default
as
Thead
}
from
'
ui/shared/TheadSticky
'
;
import
AddressCoinBalanceListItem
from
'
./AddressCoinBalanceListItem
'
;
import
AddressCoinBalanceListItem
from
'
./AddressCoinBalanceListItem
'
;
import
AddressCoinBalanceSkeletonMobile
from
'
./AddressCoinBalanceSkeletonMobile
'
;
import
AddressCoinBalanceTableItem
from
'
./AddressCoinBalanceTableItem
'
;
import
AddressCoinBalanceTableItem
from
'
./AddressCoinBalanceTableItem
'
;
interface
Props
{
interface
Props
{
...
@@ -32,7 +34,16 @@ const AddressCoinBalanceHistory = ({ addressQuery }: Props) => {
...
@@ -32,7 +34,16 @@ const AddressCoinBalanceHistory = ({ addressQuery }: Props) => {
const content = (() => {
const content = (() => {
if (query.isLoading) {
if (query.isLoading) {
return <Box>loading</Box>;
return (
<>
<Hide below="lg">
<SkeletonTable columns={ [ '25%', '25%', '25%', '25%', '120px' ] }/>
</Hide>
<Show below="lg">
<AddressCoinBalanceSkeletonMobile/>
</Show>
</>
);
}
}
if (query.isError) {
if (query.isError) {
...
@@ -71,7 +82,7 @@ const AddressCoinBalanceHistory = ({ addressQuery }: Props) => {
...
@@ -71,7 +82,7 @@ const AddressCoinBalanceHistory = ({ addressQuery }: Props) => {
return (
return (
<Box mt={ 8 }>
<Box mt={ 8 }>
{ !isPaginatorHidden && (
{ !isPaginatorHidden && (
<ActionBar>
<ActionBar
mt={ -6 }
>
<Pagination ml="auto" { ...query.pagination }/>
<Pagination ml="auto" { ...query.pagination }/>
</ActionBar>
</ActionBar>
) }
) }
...
...
ui/address/coinBalance/AddressCoinBalanceSkeletonMobile.tsx
0 → 100644
View file @
8e14571e
import
{
Skeleton
,
Flex
,
Box
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
const
AddressCoinBalanceSkeletonMobile
=
()
=>
{
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
return
(
<
Box
>
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
<
Flex
key=
{
index
}
rowGap=
{
3
}
flexDirection=
"column"
paddingY=
{
6
}
borderTopWidth=
"1px"
borderColor=
{
borderColor
}
_last=
{
{
borderBottomWidth
:
'
1px
'
,
}
}
>
<
Flex
justifyContent=
"space-between"
w=
"100%"
h=
{
6
}
>
<
Skeleton
w=
"170px"
/>
<
Skeleton
w=
"120px"
/>
</
Flex
>
<
Flex
h=
{
6
}
columnGap=
{
2
}
>
<
Skeleton
w=
"40px"
/>
<
Skeleton
w=
"80px"
/>
</
Flex
>
<
Flex
h=
{
6
}
columnGap=
{
2
}
>
<
Skeleton
w=
"40px"
/>
<
Skeleton
w=
"150px"
/>
</
Flex
>
<
Flex
h=
{
6
}
columnGap=
{
2
}
>
<
Skeleton
w=
"30px"
/>
<
Skeleton
w=
"60px"
/>
</
Flex
>
</
Flex
>
))
}
</
Box
>
);
};
export
default
AddressCoinBalanceSkeletonMobile
;
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