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
7f2afd75
Commit
7f2afd75
authored
Nov 03, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
text instead of alert if empty table
parent
42ea53d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
BlocksContent.tsx
ui/blocks/BlocksContent.tsx
+5
-5
TxInternals.tsx
ui/tx/TxInternals.tsx
+3
-3
TxLogs.tsx
ui/tx/TxLogs.tsx
+2
-2
TxsContent.tsx
ui/txs/TxsContent.tsx
+3
-3
No files found.
ui/blocks/BlocksContent.tsx
View file @
7f2afd75
import
{
Box
,
Text
,
Show
,
Alert
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Text
,
Show
,
Hide
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
useQuery
}
from
'
@tanstack/react-query
'
;
import
React
from
'
react
'
;
...
...
@@ -31,10 +31,10 @@ const BlocksContent = ({ type }: Props) => {
<
Show
below=
"lg"
key=
"skeleton-mobile"
>
<
BlocksSkeletonMobile
/>
</
Show
>
<
Show
above
=
"lg"
key=
"skeleton-desktop"
>
<
Hide
below
=
"lg"
key=
"skeleton-desktop"
>
<
Skeleton
h=
{
6
}
mb=
{
8
}
w=
"150px"
/>
<
SkeletonTable
columns=
{
[
'
125px
'
,
'
120px
'
,
'
21%
'
,
'
64px
'
,
'
35%
'
,
'
22%
'
,
'
22%
'
]
}
/>
</
Show
>
</
Hide
>
</>
);
}
...
...
@@ -44,14 +44,14 @@ const BlocksContent = ({ type }: Props) => {
}
if
(
data
.
items
.
length
===
0
)
{
return
<
Alert
>
There are no blocks.
</
Aler
t
>;
return
<
Text
as=
"span"
>
There are no blocks.
</
Tex
t
>;
}
return
(
<>
<
Text
as=
"span"
>
Total of
{
data
.
items
[
0
].
height
.
toLocaleString
()
}
blocks
</
Text
>
<
Show
below=
"lg"
key=
"content-mobile"
><
BlocksList
data=
{
data
.
items
}
/></
Show
>
<
Show
above=
"lg"
key=
"content-desktop"
><
BlocksTable
data=
{
data
.
items
}
/></
Show
>
<
Hide
below=
"lg"
key=
"content-desktop"
><
BlocksTable
data=
{
data
.
items
}
/></
Hide
>
<
Box
mx=
{
{
base
:
0
,
lg
:
6
}
}
my=
{
{
base
:
6
,
lg
:
3
}
}
>
{
/* eslint-disable-next-line react/jsx-no-bind */
}
<
Pagination
page=
{
1
}
onNextPageClick=
{
()
=>
{}
}
onPrevPageClick=
{
()
=>
{}
}
resetPage=
{
()
=>
{}
}
hasNextPage
/>
...
...
ui/tx/TxInternals.tsx
View file @
7f2afd75
import
{
Box
,
Flex
,
Alert
,
Show
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
,
Show
,
Hide
}
from
'
@chakra-ui/react
'
;
import
{
useQuery
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
...
...
@@ -96,7 +96,7 @@ const TxInternals = () => {
return
(
<>
<
Show
below=
"lg"
><
TxInternalsSkeletonMobile
/></
Show
>
<
Show
above=
"lg"
><
TxInternalsSkeletonDesktop
/></
Show
>
<
Hide
below=
"lg"
><
TxInternalsSkeletonDesktop
/></
Hide
>
</>
);
}
...
...
@@ -106,7 +106,7 @@ const TxInternals = () => {
}
if
(
data
.
items
.
length
===
0
)
{
return
<
Alert
>
There are no internal transactions for this transaction.
</
Aler
t
>;
return
<
Text
as=
"span"
>
There are no internal transactions for this transaction.
</
Tex
t
>;
}
const
content
=
(()
=>
{
...
...
ui/tx/TxLogs.tsx
View file @
7f2afd75
import
{
Box
,
Aler
t
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Tex
t
}
from
'
@chakra-ui/react
'
;
import
{
useQuery
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
...
...
@@ -37,7 +37,7 @@ const TxLogs = () => {
}
if
(
data
.
items
.
length
===
0
)
{
return
<
Alert
>
There are no logs for this transaction.
</
Aler
t
>;
return
<
Text
as=
"span"
>
There are no logs for this transaction.
</
Tex
t
>;
}
return
(
...
...
ui/txs/TxsContent.tsx
View file @
7f2afd75
import
{
Alert
,
Box
,
Show
}
from
'
@chakra-ui/react
'
;
import
{
Text
,
Box
,
Show
,
Hide
}
from
'
@chakra-ui/react
'
;
import
React
,
{
useState
,
useCallback
}
from
'
react
'
;
import
type
{
TTxsFilters
}
from
'
types/api/txsFilters
'
;
...
...
@@ -71,13 +71,13 @@ const TxsContent = ({
const
txs
=
data
?.
items
;
if
(
!
isLoading
&&
!
txs
)
{
return
<
Alert
>
There are no transactions.
</
Aler
t
>;
return
<
Text
as=
"span"
>
There are no transactions.
</
Tex
t
>;
}
let
content
=
(
<>
<
Show
below=
"lg"
ssr=
{
false
}
><
TxsSkeletonMobile
/></
Show
>
<
Show
above=
"lg"
ssr=
{
false
}
><
TxsSkeletonDesktop
/></
Show
>
<
Hide
below=
"lg"
ssr=
{
false
}
><
TxsSkeletonDesktop
/></
Hide
>
</>
);
...
...
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