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
f0eef1bc
Commit
f0eef1bc
authored
Dec 06, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skeleton
parent
e10e4061
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
48 deletions
+78
-48
AddressDetails.tsx
ui/address/AddressDetails.tsx
+4
-2
AddressDetailsSkeleton.tsx
ui/address/details/AddressDetailsSkeleton.tsx
+30
-0
BlockDetailsSkeleton.tsx
ui/block/details/BlockDetailsSkeleton.tsx
+13
-23
DetailsSkeletonRow.tsx
ui/shared/skeletons/DetailsSkeletonRow.tsx
+18
-0
TxDetailsSkeleton.tsx
ui/tx/details/TxDetailsSkeleton.tsx
+13
-23
No files found.
ui/address/AddressDetails.tsx
View file @
f0eef1bc
...
...
@@ -17,10 +17,12 @@ import useFetch from 'lib/hooks/useFetch';
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
CopyToClipboard
from
'
ui/shared/CopyToClipboard
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
ExternalLink
from
'
ui/shared/ExternalLink
'
;
import
HashStringShorten
from
'
ui/shared/HashStringShorten
'
;
import
AddressDetailsSkeleton
from
'
./details/AddressDetailsSkeleton
'
;
import
TokenSelectDesktop
from
'
./tokenSelect/TokenSelectDesktop
'
;
import
TokenSelectMobile
from
'
./tokenSelect/TokenSelectMobile
'
;
...
...
@@ -50,11 +52,11 @@ const AddressDetails = ({ addressQuery }: Props) => {
);
if
(
countersQuery
.
isLoading
||
addressQuery
.
isLoading
||
tokenBalancesQuery
.
isLoading
)
{
return
<
Box
>
loading
</
Box
>;
return
<
AddressDetailsSkeleton
/
>;
}
if
(
countersQuery
.
isError
||
addressQuery
.
isError
||
tokenBalancesQuery
.
isError
)
{
return
<
Box
>
error
</
Box
>;
return
<
DataFetchAlert
/
>;
}
const
explorers
=
appConfig
.
network
.
explorers
.
filter
(({
paths
})
=>
paths
.
address
);
...
...
ui/address/details/AddressDetailsSkeleton.tsx
0 → 100644
View file @
f0eef1bc
import
{
Box
,
Flex
,
Grid
,
Skeleton
,
SkeletonCircle
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
const
AddressDetailsSkeleton
=
()
=>
{
return
(
<
Box
>
<
Flex
align=
"center"
>
<
SkeletonCircle
boxSize=
{
6
}
flexShrink=
{
0
}
/>
<
Skeleton
h=
{
6
}
w=
"420px"
ml=
{
2
}
/>
<
Skeleton
h=
{
6
}
w=
"24px"
ml=
{
2
}
flexShrink=
{
0
}
/>
<
Skeleton
h=
{
8
}
w=
"48px"
ml=
{
3
}
flexShrink=
{
0
}
/>
<
Skeleton
h=
{
8
}
w=
"48px"
ml=
{
3
}
flexShrink=
{
0
}
/>
</
Flex
>
<
Flex
align=
"center"
columnGap=
{
4
}
mt=
{
8
}
>
<
Skeleton
h=
{
6
}
w=
"200px"
/>
<
Skeleton
h=
{
6
}
w=
"80px"
/>
</
Flex
>
<
Grid
columnGap=
{
8
}
rowGap=
{
{
base
:
5
,
lg
:
7
}
}
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
150px 1fr
'
}
}
maxW=
"1000px"
mt=
{
8
}
>
<
DetailsSkeletonRow
w=
"30%"
/>
<
DetailsSkeletonRow
w=
"10%"
/>
<
DetailsSkeletonRow
w=
"10%"
/>
<
DetailsSkeletonRow
w=
"20%"
/>
</
Grid
>
</
Box
>
);
};
export
default
AddressDetailsSkeleton
;
ui/block/details/BlockDetailsSkeleton.tsx
View file @
f0eef1bc
import
{
Grid
,
GridItem
,
Skeleton
,
SkeletonCircle
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
const
SkeletonRow
=
({
w
=
'
100%
'
}:
{
w
?:
string
})
=>
(
<>
<
GridItem
display=
"flex"
columnGap=
{
2
}
w=
{
{
base
:
'
50%
'
,
lg
:
'
auto
'
}
}
_notFirst=
{
{
mt
:
{
base
:
3
,
lg
:
0
}
}
}
>
<
SkeletonCircle
h=
{
5
}
w=
{
5
}
/>
<
Skeleton
flexGrow=
{
1
}
h=
{
5
}
borderRadius=
"full"
/>
</
GridItem
>
<
GridItem
pl=
{
{
base
:
7
,
lg
:
0
}
}
>
<
Skeleton
h=
{
5
}
borderRadius=
"full"
w=
{
{
base
:
'
100%
'
,
lg
:
w
}
}
/>
</
GridItem
>
</>
);
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
const
BlockDetailsSkeleton
=
()
=>
{
const
sectionGap
=
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
1
,
lg
:
4
}
}
/>;
return
(
<
Grid
columnGap=
{
8
}
rowGap=
{
{
base
:
5
,
lg
:
7
}
}
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
210px 1fr
'
}
}
maxW=
"1000px"
>
<
SkeletonRow
w=
"25%"
/>
<
SkeletonRow
w=
"25%"
/>
<
SkeletonRow
w=
"65%"
/>
<
SkeletonRow
w=
"25%"
/>
<
SkeletonRow
/>
<
SkeletonRow
/>
<
Details
SkeletonRow
w=
"25%"
/>
<
Details
SkeletonRow
w=
"25%"
/>
<
Details
SkeletonRow
w=
"65%"
/>
<
Details
SkeletonRow
w=
"25%"
/>
<
Details
SkeletonRow
/>
<
Details
SkeletonRow
/>
{
sectionGap
}
<
SkeletonRow
w=
"50%"
/>
<
SkeletonRow
w=
"25%"
/>
<
SkeletonRow
w=
"50%"
/>
<
SkeletonRow
w=
"50%"
/>
<
SkeletonRow
w=
"50%"
/>
<
Details
SkeletonRow
w=
"50%"
/>
<
Details
SkeletonRow
w=
"25%"
/>
<
Details
SkeletonRow
w=
"50%"
/>
<
Details
SkeletonRow
w=
"50%"
/>
<
Details
SkeletonRow
w=
"50%"
/>
{
sectionGap
}
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
>
<
Skeleton
h=
{
5
}
borderRadius=
"full"
w=
"100px"
/>
...
...
ui/shared/skeletons/DetailsSkeletonRow.tsx
0 → 100644
View file @
f0eef1bc
import
{
GridItem
,
Skeleton
,
SkeletonCircle
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
const
DetailsSkeletonRow
=
({
w
=
'
100%
'
}:
{
w
?:
string
})
=>
{
return
(
<>
<
GridItem
display=
"flex"
columnGap=
{
2
}
w=
{
{
base
:
'
50%
'
,
lg
:
'
auto
'
}
}
_notFirst=
{
{
mt
:
{
base
:
3
,
lg
:
0
}
}
}
>
<
SkeletonCircle
h=
{
5
}
w=
{
5
}
/>
<
Skeleton
flexGrow=
{
1
}
h=
{
5
}
borderRadius=
"full"
/>
</
GridItem
>
<
GridItem
pl=
{
{
base
:
7
,
lg
:
0
}
}
>
<
Skeleton
h=
{
5
}
borderRadius=
"full"
w=
{
{
base
:
'
100%
'
,
lg
:
w
}
}
/>
</
GridItem
>
</>
);
};
export
default
DetailsSkeletonRow
;
ui/tx/details/TxDetailsSkeleton.tsx
View file @
f0eef1bc
import
{
Grid
,
GridItem
,
Skeleton
,
SkeletonCircle
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
const
SkeletonRow
=
({
w
=
'
100%
'
}:
{
w
?:
string
})
=>
(
<>
<
GridItem
display=
"flex"
columnGap=
{
2
}
w=
{
{
base
:
'
50%
'
,
lg
:
'
auto
'
}
}
_notFirst=
{
{
mt
:
{
base
:
3
,
lg
:
0
}
}
}
>
<
SkeletonCircle
h=
{
5
}
w=
{
5
}
/>
<
Skeleton
flexGrow=
{
1
}
h=
{
5
}
borderRadius=
"full"
/>
</
GridItem
>
<
GridItem
pl=
{
{
base
:
7
,
lg
:
0
}
}
>
<
Skeleton
h=
{
5
}
borderRadius=
"full"
w=
{
{
base
:
'
100%
'
,
lg
:
w
}
}
/>
</
GridItem
>
</>
);
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
const
TxDetailsSkeleton
=
()
=>
{
const
sectionGap
=
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
mt=
{
{
base
:
1
,
lg
:
4
}
}
/>;
return
(
<
Grid
columnGap=
{
8
}
rowGap=
{
{
base
:
5
,
lg
:
7
}
}
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
210px 1fr
'
}
}
maxW=
"1000px"
>
<
SkeletonRow
/>
<
SkeletonRow
w=
"20%"
/>
<
SkeletonRow
w=
"50%"
/>
<
SkeletonRow
/>
<
SkeletonRow
w=
"70%"
/>
<
SkeletonRow
w=
"70%"
/>
<
Details
SkeletonRow
/>
<
Details
SkeletonRow
w=
"20%"
/>
<
Details
SkeletonRow
w=
"50%"
/>
<
Details
SkeletonRow
/>
<
Details
SkeletonRow
w=
"70%"
/>
<
Details
SkeletonRow
w=
"70%"
/>
{
sectionGap
}
<
SkeletonRow
w=
"40%"
/>
<
SkeletonRow
w=
"40%"
/>
<
SkeletonRow
w=
"40%"
/>
<
SkeletonRow
w=
"40%"
/>
<
SkeletonRow
w=
"40%"
/>
<
Details
SkeletonRow
w=
"40%"
/>
<
Details
SkeletonRow
w=
"40%"
/>
<
Details
SkeletonRow
w=
"40%"
/>
<
Details
SkeletonRow
w=
"40%"
/>
<
Details
SkeletonRow
w=
"40%"
/>
{
sectionGap
}
<
GridItem
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
>
<
Skeleton
h=
{
5
}
borderRadius=
"full"
w=
"100px"
/>
...
...
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