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
f3b7c90a
Commit
f3b7c90a
authored
Jan 25, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show-hide ssr
parent
ea50d53d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
45 additions
and
54 deletions
+45
-54
AddressBlocksValidated.tsx
ui/address/AddressBlocksValidated.tsx
+4
-4
AddressInternalTxs.tsx
ui/address/AddressInternalTxs.tsx
+2
-2
AddressTokenTransfers.tsx
ui/address/AddressTokenTransfers.tsx
+4
-4
AddressCoinBalanceHistory.tsx
ui/address/coinBalance/AddressCoinBalanceHistory.tsx
+4
-4
Accounts.tsx
ui/pages/Accounts.tsx
+2
-6
SearchResults.tsx
ui/pages/SearchResults.tsx
+2
-2
SkeletonList.tsx
ui/shared/skeletons/SkeletonList.tsx
+4
-4
SkeletonTable.tsx
ui/shared/skeletons/SkeletonTable.tsx
+6
-5
TokenTransfer.tsx
ui/token/TokenTransfer/TokenTransfer.tsx
+4
-4
Tokens.tsx
ui/tokens/Tokens.tsx
+8
-14
TxInternals.tsx
ui/tx/TxInternals.tsx
+2
-2
TxTokenTransfer.tsx
ui/tx/TxTokenTransfer.tsx
+2
-2
TxDetailsTokenTransfers.tsx
ui/tx/details/TxDetailsTokenTransfers.tsx
+1
-1
No files found.
ui/address/AddressBlocksValidated.tsx
View file @
f3b7c90a
...
@@ -75,10 +75,10 @@ const AddressBlocksValidated = ({ scrollRef }: Props) => {
...
@@ -75,10 +75,10 @@ const AddressBlocksValidated = ({ scrollRef }: Props) => {
if
(
query
.
isLoading
)
{
if
(
query
.
isLoading
)
{
return
(
return
(
<>
<>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
SkeletonTable
columns=
{
[
'
17%
'
,
'
17%
'
,
'
16%
'
,
'
25%
'
,
'
25%
'
]
}
/>
<
SkeletonTable
columns=
{
[
'
17%
'
,
'
17%
'
,
'
16%
'
,
'
25%
'
,
'
25%
'
]
}
/>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
SkeletonList
/>
<
SkeletonList
/>
</
Show
>
</
Show
>
</>
</>
...
@@ -95,7 +95,7 @@ const AddressBlocksValidated = ({ scrollRef }: Props) => {
...
@@ -95,7 +95,7 @@ const AddressBlocksValidated = ({ scrollRef }: Props) => {
return
(
return
(
<>
<>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Table
variant=
"simple"
size=
"sm"
>
<
Table
variant=
"simple"
size=
"sm"
>
<
Thead
top=
{
80
}
>
<
Thead
top=
{
80
}
>
<
Tr
>
<
Tr
>
...
@@ -113,7 +113,7 @@ const AddressBlocksValidated = ({ scrollRef }: Props) => {
...
@@ -113,7 +113,7 @@ const AddressBlocksValidated = ({ scrollRef }: Props) => {
</
Tbody
>
</
Tbody
>
</
Table
>
</
Table
>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
{
query
.
data
.
items
.
map
((
item
)
=>
(
{
query
.
data
.
items
.
map
((
item
)
=>
(
<
AddressBlocksValidatedListItem
key=
{
item
.
height
}
{
...
item
}
page=
{
query
.
pagination
.
page
}
/>
<
AddressBlocksValidatedListItem
key=
{
item
.
height
}
{
...
item
}
page=
{
query
.
pagination
.
page
}
/>
))
}
))
}
...
...
ui/address/AddressInternalTxs.tsx
View file @
f3b7c90a
...
@@ -48,8 +48,8 @@ const AddressInternalTxs = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLDivE
...
@@ -48,8 +48,8 @@ const AddressInternalTxs = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLDivE
if
(
isLoading
)
{
if
(
isLoading
)
{
return
(
return
(
<>
<>
<
Show
below=
"lg"
><
AddressIntTxsSkeletonMobile
/></
Show
>
<
Show
below=
"lg"
ssr=
{
false
}
><
AddressIntTxsSkeletonMobile
/></
Show
>
<
Hide
below=
"lg"
><
AddressIntTxsSkeletonDesktop
/></
Hide
>
<
Hide
below=
"lg"
ssr=
{
false
}
><
AddressIntTxsSkeletonDesktop
/></
Hide
>
</>
</>
);
);
}
}
...
...
ui/address/AddressTokenTransfers.tsx
View file @
f3b7c90a
...
@@ -166,10 +166,10 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
...
@@ -166,10 +166,10 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
if
(
isLoading
)
{
if
(
isLoading
)
{
return
(
return
(
<>
<>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
SkeletonTable
columns=
{
[
'
44px
'
,
'
185px
'
,
'
160px
'
,
'
25%
'
,
'
25%
'
,
'
25%
'
,
'
25%
'
]
}
/>
<
SkeletonTable
columns=
{
[
'
44px
'
,
'
185px
'
,
'
160px
'
,
'
25%
'
,
'
25%
'
,
'
25%
'
,
'
25%
'
]
}
/>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
SkeletonList
/>
<
SkeletonList
/>
</
Show
>
</
Show
>
</>
</>
...
@@ -191,7 +191,7 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
...
@@ -191,7 +191,7 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
const
items
=
data
.
items
.
reduce
(
flattenTotal
,
[]);
const
items
=
data
.
items
.
reduce
(
flattenTotal
,
[]);
return
(
return
(
<>
<>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
TokenTransferTable
<
TokenTransferTable
data=
{
items
}
data=
{
items
}
baseAddress=
{
currentAddress
}
baseAddress=
{
currentAddress
}
...
@@ -203,7 +203,7 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
...
@@ -203,7 +203,7 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
socketInfoNum=
{
newItemsCount
}
socketInfoNum=
{
newItemsCount
}
/>
/>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
{
pagination
.
page
===
1
&&
!
tokenFilter
&&
(
{
pagination
.
page
===
1
&&
!
tokenFilter
&&
(
<
SocketNewItemsNotice
<
SocketNewItemsNotice
url=
{
window
.
location
.
href
}
url=
{
window
.
location
.
href
}
...
...
ui/address/coinBalance/AddressCoinBalanceHistory.tsx
View file @
f3b7c90a
...
@@ -29,10 +29,10 @@ const AddressCoinBalanceHistory = ({ query }: Props) => {
...
@@ -29,10 +29,10 @@ const AddressCoinBalanceHistory = ({ query }: Props) => {
if
(
query
.
isLoading
)
{
if
(
query
.
isLoading
)
{
return
(
return
(
<>
<>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
SkeletonTable
columns=
{
[
'
25%
'
,
'
25%
'
,
'
25%
'
,
'
25%
'
,
'
120px
'
]
}
/>
<
SkeletonTable
columns=
{
[
'
25%
'
,
'
25%
'
,
'
25%
'
,
'
25%
'
,
'
120px
'
]
}
/>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
SkeletonList
/>
<
SkeletonList
/>
</
Show
>
</
Show
>
</>
</>
...
@@ -45,7 +45,7 @@ const AddressCoinBalanceHistory = ({ query }: Props) => {
...
@@ -45,7 +45,7 @@ const AddressCoinBalanceHistory = ({ query }: Props) => {
return
(
return
(
<>
<>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
Table
variant=
"simple"
size=
"sm"
>
<
Table
variant=
"simple"
size=
"sm"
>
<
Thead
top=
{
80
}
>
<
Thead
top=
{
80
}
>
<
Tr
>
<
Tr
>
...
@@ -63,7 +63,7 @@ const AddressCoinBalanceHistory = ({ query }: Props) => {
...
@@ -63,7 +63,7 @@ const AddressCoinBalanceHistory = ({ query }: Props) => {
</
Tbody
>
</
Tbody
>
</
Table
>
</
Table
>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
{
query
.
data
.
items
.
map
((
item
)
=>
(
{
query
.
data
.
items
.
map
((
item
)
=>
(
<
AddressCoinBalanceListItem
key=
{
item
.
block_number
}
{
...
item
}
page=
{
query
.
pagination
.
page
}
/>
<
AddressCoinBalanceListItem
key=
{
item
.
block_number
}
{
...
item
}
page=
{
query
.
pagination
.
page
}
/>
))
}
))
}
...
...
ui/pages/Accounts.tsx
View file @
f3b7c90a
...
@@ -34,12 +34,8 @@ const Accounts = () => {
...
@@ -34,12 +34,8 @@ const Accounts = () => {
return
(
return
(
<>
<>
{
bar
}
{
bar
}
<
Show
below=
"lg"
>
<
SkeletonList
display=
{
{
base
:
'
block
'
,
lg
:
'
none
'
}
}
/>
<
SkeletonList
/>
<
SkeletonTable
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
columns=
{
[
'
64px
'
,
'
30%
'
,
'
20%
'
,
'
20%
'
,
'
15%
'
,
'
15%
'
]
}
/>
</
Show
>
<
Hide
below=
"lg"
>
<
SkeletonTable
columns=
{
[
'
64px
'
,
'
30%
'
,
'
20%
'
,
'
20%
'
,
'
15%
'
,
'
15%
'
]
}
/>
</
Hide
>
</>
</>
);
);
}
}
...
...
ui/pages/SearchResults.tsx
View file @
f3b7c90a
...
@@ -32,10 +32,10 @@ const SearchResultsPageContent = () => {
...
@@ -32,10 +32,10 @@ const SearchResultsPageContent = () => {
if
(
isLoading
)
{
if
(
isLoading
)
{
return
(
return
(
<
Box
>
<
Box
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
SkeletonList
/>
<
SkeletonList
/>
</
Show
>
</
Show
>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
SkeletonTable
columns=
{
[
'
50%
'
,
'
50%
'
,
'
150px
'
]
}
/>
<
SkeletonTable
columns=
{
[
'
50%
'
,
'
50%
'
,
'
150px
'
]
}
/>
</
Hide
>
</
Hide
>
</
Box
>
</
Box
>
...
...
ui/shared/skeletons/SkeletonList.tsx
View file @
f3b7c90a
import
{
Box
,
Flex
,
Skeleton
,
SkeletonCircle
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Skeleton
,
SkeletonCircle
,
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
const
SkeletonList
=
()
=>
{
const
SkeletonList
=
(
{
className
}:
{
className
?:
string
}
)
=>
{
return
(
return
(
<
Box
>
<
Box
className=
{
className
}
>
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
{
Array
.
from
(
Array
(
2
)).
map
((
item
,
index
)
=>
(
<
Flex
<
Flex
key=
{
index
}
key=
{
index
}
...
@@ -35,4 +35,4 @@ const SkeletonList = () => {
...
@@ -35,4 +35,4 @@ const SkeletonList = () => {
);
);
};
};
export
default
SkeletonList
;
export
default
chakra
(
SkeletonList
)
;
ui/shared/skeletons/SkeletonTable.tsx
View file @
f3b7c90a
import
{
HStack
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
HStack
,
Skeleton
,
chakra
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
interface
Props
{
interface
Props
{
columns
:
Array
<
string
>
;
columns
:
Array
<
string
>
;
className
?:
string
;
}
}
const
SkeletonTable
=
({
columns
}:
Props
)
=>
{
const
SkeletonTable
=
({
columns
,
className
}:
Props
)
=>
{
return
(
return
(
<
div
>
<
Box
className=
{
className
}
>
<
Skeleton
height=
{
10
}
width=
"100%"
borderBottomLeftRadius=
"none"
borderBottomRightRadius=
"none"
/>
<
Skeleton
height=
{
10
}
width=
"100%"
borderBottomLeftRadius=
"none"
borderBottomRightRadius=
"none"
/>
{
Array
.
from
(
Array
(
3
)).
map
((
item
,
index
)
=>
(
{
Array
.
from
(
Array
(
3
)).
map
((
item
,
index
)
=>
(
<
HStack
key=
{
index
}
spacing=
{
6
}
marginTop=
{
8
}
>
<
HStack
key=
{
index
}
spacing=
{
6
}
marginTop=
{
8
}
>
...
@@ -22,8 +23,8 @@ const SkeletonTable = ({ columns }: Props) => {
...
@@ -22,8 +23,8 @@ const SkeletonTable = ({ columns }: Props) => {
))
}
))
}
</
HStack
>
</
HStack
>
))
}
))
}
</
div
>
</
Box
>
);
);
};
};
export
default
React
.
memo
(
SkeletonTable
);
export
default
React
.
memo
(
chakra
(
SkeletonTable
)
);
ui/token/TokenTransfer/TokenTransfer.tsx
View file @
f3b7c90a
...
@@ -66,11 +66,11 @@ const TokenTransfer = ({ transfersQuery, token }: Props) => {
...
@@ -66,11 +66,11 @@ const TokenTransfer = ({ transfersQuery, token }: Props) => {
if (isLoading) {
if (isLoading) {
return (
return (
<>
<>
<Hide below="lg">
<Hide below="lg"
ssr={ false }
>
<SkeletonTable columns={ [ '45%', '15%', '36px', '15%', '25%' ] }
<SkeletonTable columns={ [ '45%', '15%', '36px', '15%', '25%' ] }
/>
/>
</Hide>
</Hide>
<Show below="lg">
<Show below="lg"
ssr={ false }
>
<SkeletonList/>
<SkeletonList/>
</Show>
</Show>
</>
</>
...
@@ -88,7 +88,7 @@ const TokenTransfer = ({ transfersQuery, token }: Props) => {
...
@@ -88,7 +88,7 @@ const TokenTransfer = ({ transfersQuery, token }: Props) => {
const items = data.items.reduce(flattenTotal, []);
const items = data.items.reduce(flattenTotal, []);
return (
return (
<>
<>
<Hide below="lg">
<Hide below="lg"
ssr={ false }
>
<TokenTransferTable
<TokenTransferTable
data={ items }
data={ items }
top={ 80 }
top={ 80 }
...
@@ -100,7 +100,7 @@ const TokenTransfer = ({ transfersQuery, token }: Props) => {
...
@@ -100,7 +100,7 @@ const TokenTransfer = ({ transfersQuery, token }: Props) => {
socketInfoNum={ newItemsCount }
socketInfoNum={ newItemsCount }
/>
/>
</Hide>
</Hide>
<Show below="lg">
<Show below="lg"
ssr={ false }
>
{ pagination.page === 1 && (
{ pagination.page === 1 && (
<SocketNewItemsNotice
<SocketNewItemsNotice
url={ window.location.href }
url={ window.location.href }
...
...
ui/tokens/Tokens.tsx
View file @
f3b7c90a
...
@@ -69,19 +69,15 @@ const Tokens = () => {
...
@@ -69,19 +69,15 @@ const Tokens = () => {
const
bar
=
(
const
bar
=
(
<>
<>
<
Show
below=
"lg"
>
<
HStack
spacing=
{
3
}
mb=
{
6
}
display=
{
{
base
:
'
flex
'
,
lg
:
'
none
'
}
}
>
<
HStack
spacing=
{
3
}
mb=
{
6
}
>
{
typeFilter
}
{
filterInput
}
</
HStack
>
<
ActionBar
mt=
{
-
6
}
>
<
HStack
spacing=
{
3
}
display=
{
{
base
:
'
none
'
,
lg
:
'
flex
'
}
}
>
{
typeFilter
}
{
typeFilter
}
{
filterInput
}
{
filterInput
}
</
HStack
>
</
HStack
>
</
Show
>
<
ActionBar
mt=
{
-
6
}
>
<
Hide
below=
"lg"
>
<
HStack
spacing=
{
3
}
>
{
typeFilter
}
{
filterInput
}
</
HStack
>
</
Hide
>
{
isPaginationVisible
&&
<
Pagination
ml=
"auto"
{
...
pagination
}
/>
}
{
isPaginationVisible
&&
<
Pagination
ml=
"auto"
{
...
pagination
}
/>
}
</
ActionBar
>
</
ActionBar
>
</>
</>
...
@@ -91,10 +87,8 @@ const Tokens = () => {
...
@@ -91,10 +87,8 @@ const Tokens = () => {
return
(
return
(
<>
<>
{
bar
}
{
bar
}
<
Show
below=
"lg"
><
SkeletonList
/></
Show
>
<
SkeletonList
display=
{
{
base
:
'
block
'
,
lg
:
'
none
'
}
}
/>
<
Hide
below=
"lg"
>
<
SkeletonTable
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
columns=
{
[
'
25px
'
,
'
33%
'
,
'
33%
'
,
'
33%
'
,
'
110px
'
]
}
/>
<
SkeletonTable
columns=
{
[
'
25px
'
,
'
33%
'
,
'
33%
'
,
'
33%
'
,
'
110px
'
]
}
/>
</
Hide
>
</>
</>
);
);
}
}
...
...
ui/tx/TxInternals.tsx
View file @
f3b7c90a
...
@@ -101,8 +101,8 @@ const TxInternals = () => {
...
@@ -101,8 +101,8 @@ const TxInternals = () => {
if
(
isLoading
||
txInfo
.
isLoading
)
{
if
(
isLoading
||
txInfo
.
isLoading
)
{
return
(
return
(
<>
<>
<
Show
below=
"lg"
><
SkeletonList
/></
Show
>
<
Show
below=
"lg"
ssr=
{
false
}
><
SkeletonList
/></
Show
>
<
Hide
below=
"lg"
><
SkeletonTable
columns=
{
[
'
28%
'
,
'
20%
'
,
'
24px
'
,
'
20%
'
,
'
16%
'
,
'
16%
'
]
}
/></
Hide
>
<
Hide
below=
"lg"
ssr=
{
false
}
><
SkeletonTable
columns=
{
[
'
28%
'
,
'
20%
'
,
'
24px
'
,
'
20%
'
,
'
16%
'
,
'
16%
'
]
}
/></
Hide
>
</>
</>
);
);
}
}
...
...
ui/tx/TxTokenTransfer.tsx
View file @
f3b7c90a
...
@@ -83,10 +83,10 @@ const TxTokenTransfer = () => {
...
@@ -83,10 +83,10 @@ const TxTokenTransfer = () => {
const
items
=
tokenTransferQuery
.
data
.
items
.
reduce
(
flattenTotal
,
[]);
const
items
=
tokenTransferQuery
.
data
.
items
.
reduce
(
flattenTotal
,
[]);
return
(
return
(
<>
<>
<
Hide
below=
"lg"
>
<
Hide
below=
"lg"
ssr=
{
false
}
>
<
TokenTransferTable
data=
{
items
}
top=
{
80
}
/>
<
TokenTransferTable
data=
{
items
}
top=
{
80
}
/>
</
Hide
>
</
Hide
>
<
Show
below=
"lg"
>
<
Show
below=
"lg"
ssr=
{
false
}
>
<
TokenTransferList
data=
{
items
}
/>
<
TokenTransferList
data=
{
items
}
/>
</
Show
>
</
Show
>
</>
</>
...
...
ui/tx/details/TxDetailsTokenTransfers.tsx
View file @
f3b7c90a
...
@@ -61,7 +61,7 @@ const TxDetailsTokenTransfers = ({ data, txHash }: Props) => {
...
@@ -61,7 +61,7 @@ const TxDetailsTokenTransfers = ({ data, txHash }: Props) => {
})
}
})
}
{
showViewAllLink
&&
(
{
showViewAllLink
&&
(
<>
<>
<
Show
above=
"lg"
><
GridItem
></
GridItem
></
Show
>
<
Show
above=
"lg"
ssr=
{
false
}
><
GridItem
></
GridItem
></
Show
>
<
GridItem
fontSize=
"sm"
alignItems=
"center"
display=
"inline-flex"
pl=
{
{
base
:
'
28px
'
,
lg
:
0
}
}
>
<
GridItem
fontSize=
"sm"
alignItems=
"center"
display=
"inline-flex"
pl=
{
{
base
:
'
28px
'
,
lg
:
0
}
}
>
<
Icon
as=
{
tokenIcon
}
boxSize=
{
6
}
/>
<
Icon
as=
{
tokenIcon
}
boxSize=
{
6
}
/>
<
NextLink
href=
{
viewAllUrl
}
passHref
>
<
NextLink
href=
{
viewAllUrl
}
passHref
>
...
...
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