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
dd9bc0c1
Commit
dd9bc0c1
authored
May 02, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add action button to tx page
parent
55c46fa4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
TxSubHeading.tsx
ui/tx/TxSubHeading.tsx
+14
-3
No files found.
ui/tx/TxSubHeading.tsx
View file @
dd9bc0c1
...
...
@@ -6,6 +6,8 @@ import useApiQuery from 'lib/api/useApiQuery';
import
{
NOVES_TRANSLATE
}
from
'
stubs/noves/NovesTranslate
'
;
import
{
TX_INTERPRETATION
}
from
'
stubs/txInterpretation
'
;
import
AccountActionsMenu
from
'
ui/shared/AccountActionsMenu/AccountActionsMenu
'
;
import
ActionButton
from
'
ui/shared/ActionButton/ActionButton
'
;
import
useActionData
from
'
ui/shared/ActionButton/useActionData
'
;
import
{
TX_ACTIONS_BLOCK_ID
}
from
'
ui/shared/DetailsActionsWrapper
'
;
import
TxEntity
from
'
ui/shared/entities/tx/TxEntity
'
;
import
NetworkExplorers
from
'
ui/shared/NetworkExplorers
'
;
...
...
@@ -26,6 +28,8 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => {
const
hasInterpretationFeature
=
feature
.
isEnabled
;
const
isNovesInterpretation
=
hasInterpretationFeature
&&
feature
.
provider
===
'
noves
'
;
const
actionData
=
useActionData
(
txQuery
.
data
?.
to
?.
hash
);
const
txInterpretationQuery
=
useApiQuery
(
'
tx_interpretation
'
,
{
pathParams
:
{
hash
},
queryOptions
:
{
...
...
@@ -108,9 +112,16 @@ const TxSubHeading = ({ hash, hasTag, txQuery }: Props) => {
return
(
<
Box
display=
{
{
base
:
'
block
'
,
lg
:
'
flex
'
}
}
alignItems=
"center"
w=
"100%"
>
{
content
}
<
Flex
alignItems=
"center"
justifyContent=
{
{
base
:
'
start
'
,
lg
:
'
space-between
'
}
}
flexGrow=
{
1
}
>
{
!
hasTag
&&
<
AccountActionsMenu
mr=
{
3
}
mt=
{
{
base
:
3
,
lg
:
0
}
}
/>
}
<
NetworkExplorers
type=
"tx"
pathParam=
{
hash
}
ml=
{
{
base
:
0
,
lg
:
'
auto
'
}
}
mt=
{
{
base
:
3
,
lg
:
0
}
}
/>
<
Flex
alignItems=
"center"
justifyContent=
{
{
base
:
'
start
'
,
lg
:
'
space-between
'
}
}
flexGrow=
{
1
}
gap=
{
3
}
mt=
{
{
base
:
3
,
lg
:
0
}
}
>
{
!
hasTag
&&
<
AccountActionsMenu
/>
}
<
ActionButton
data=
{
actionData
}
txHash=
{
hash
}
/>
<
NetworkExplorers
type=
"tx"
pathParam=
{
hash
}
ml=
{
{
base
:
0
,
lg
:
'
auto
'
}
}
/>
</
Flex
>
</
Box
>
);
...
...
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