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
34ba27e1
Commit
34ba27e1
authored
Sep 28, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block txs tab
parent
0b0eedbb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
10 deletions
+23
-10
BlockTxs.tsx
ui/block/BlockTxs.tsx
+9
-0
Block.tsx
ui/pages/Block.tsx
+2
-1
TxsContent.tsx
ui/txs/TxsContent.tsx
+11
-8
TxsPending.tsx
ui/txs/TxsPending.tsx
+1
-1
No files found.
ui/block/BlockTxs.tsx
0 → 100644
View file @
34ba27e1
import
React
from
'
react
'
;
import
TxsContent
from
'
ui/txs/TxsContent
'
;
const
BlockTxs
=
()
=>
{
return
<
TxsContent
showDescription=
{
false
}
showSortButton=
{
false
}
/>;
};
export
default
BlockTxs
;
ui/pages/Block.tsx
View file @
34ba27e1
...
...
@@ -4,13 +4,14 @@ import React from 'react';
import
type
{
RoutedTab
}
from
'
ui/shared/RoutedTabs/types
'
;
import
BlockDetails
from
'
ui/block/BlockDetails
'
;
import
BlockTxs
from
'
ui/block/BlockTxs
'
;
import
Page
from
'
ui/shared/Page
'
;
import
PageHeader
from
'
ui/shared/PageHeader
'
;
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
const
TABS
:
Array
<
RoutedTab
>
=
[
{
routeName
:
'
block_index
'
,
title
:
'
Details
'
,
component
:
<
BlockDetails
/>
},
{
routeName
:
'
block_txs
'
,
title
:
'
Transactions
'
,
component
:
<
div
>
Transactions
</
div
>
},
{
routeName
:
'
block_txs
'
,
title
:
'
Transactions
'
,
component
:
<
BlockTxs
/
>
},
];
export
interface
Props
{
...
...
ui/txs/TxsContent.tsx
View file @
34ba27e1
...
...
@@ -14,10 +14,11 @@ import TxsListItem from './TxsListItem';
import
TxsTable
from
'
./TxsTable
'
;
type
Props
=
{
isPending
?:
boolean
;
showDescription
?:
boolean
;
showSortButton
?:
boolean
;
}
const
TxsContent
=
({
isPending
}:
Props
)
=>
{
const
TxsContent
=
({
showSortButton
=
true
,
showDescription
=
true
}:
Props
)
=>
{
const
isMobile
=
useIsMobile
();
const
[
sorting
,
setSorting
]
=
useState
<
Sort
>
();
...
...
@@ -70,7 +71,7 @@ const TxsContent = ({ isPending }: Props) => {
return
(
<>
{
!
isPending
&&
<
Box
mb=
{
12
}
>
Only the first 10,000 elements are displayed
</
Box
>
}
{
showDescription
&&
<
Box
mb=
{
12
}
>
Only the first 10,000 elements are displayed
</
Box
>
}
<
HStack
mb=
{
6
}
>
{
/* TODO */
}
<
FilterButton
...
...
@@ -80,11 +81,13 @@ const TxsContent = ({ isPending }: Props) => {
onClick=
{
()
=>
{}
}
appliedFiltersNum=
{
0
}
/>
<
SortButton
// eslint-disable-next-line react/jsx-no-bind
handleSort=
{
()
=>
{}
}
isSortActive=
{
Boolean
(
sorting
)
}
/>
{
showSortButton
&&
(
<
SortButton
// eslint-disable-next-line react/jsx-no-bind
handleSort=
{
()
=>
{}
}
isSortActive=
{
Boolean
(
sorting
)
}
/>
)
}
<
FilterInput
// eslint-disable-next-line react/jsx-no-bind
onChange=
{
()
=>
{}
}
...
...
ui/txs/TxsPending.tsx
View file @
34ba27e1
...
...
@@ -3,7 +3,7 @@ import React from 'react';
import
TxsContent
from
'
./TxsContent
'
;
const
TxsPending
=
()
=>
{
return
<
TxsContent
isPending
/>;
return
<
TxsContent
showDescription=
{
false
}
/>;
};
export
default
TxsPending
;
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