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
8eaefde7
Commit
8eaefde7
authored
Aug 24, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address entity with token filter
parent
b827b27b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
AddressEntityWithTokenFilter.tsx
ui/shared/entities/address/AddressEntityWithTokenFilter.tsx
+40
-0
No files found.
ui/shared/entities/address/AddressEntityWithTokenFilter.tsx
0 → 100644
View file @
8eaefde7
import
{
chakra
}
from
'
@chakra-ui/react
'
;
import
_omit
from
'
lodash/omit
'
;
import
React
from
'
react
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
*
as
AddressEntity
from
'
./AddressEntity
'
;
interface
Props
extends
AddressEntity
.
EntityProps
{
tokenHash
:
string
;
}
const
AddressEntityWithTokenFilter
=
(
props
:
Props
)
=>
{
const
linkProps
=
_omit
(
props
,
[
'
className
'
]);
const
partsProps
=
_omit
(
props
,
[
'
className
'
,
'
onClick
'
]);
const
defaultHref
=
route
({
pathname
:
'
/address/[hash]
'
,
query
:
{
...
props
.
query
,
hash
:
props
.
address
.
hash
,
tab
:
'
token_transfers
'
,
token
:
props
.
tokenHash
,
scroll_to_tabs
:
'
true
'
,
},
});
return
(
<
AddressEntity
.
Container
className=
{
props
.
className
}
>
<
AddressEntity
.
Icon
{
...
partsProps
}
/>
<
AddressEntity
.
Link
{
...
linkProps
}
href=
{
props
.
href
??
defaultHref
}
>
<
AddressEntity
.
Content
{
...
partsProps
}
/>
</
AddressEntity
.
Link
>
</
AddressEntity
.
Container
>
);
};
export
default
chakra
(
AddressEntityWithTokenFilter
);
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