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
87d4e7a7
Commit
87d4e7a7
authored
Mar 07, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l2 menu
parent
7e84d562
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
useNavItems.tsx
lib/hooks/useNavItems.tsx
+10
-9
No files found.
lib/hooks/useNavItems.tsx
View file @
87d4e7a7
...
...
@@ -6,12 +6,12 @@ import appConfig from 'configs/app/config';
import
abiIcon
from
'
icons/ABI.svg
'
;
import
apiKeysIcon
from
'
icons/API.svg
'
;
import
appsIcon
from
'
icons/apps.svg
'
;
//
import withdrawalsIcon from 'icons/arrows/north-east.svg';
import
withdrawalsIcon
from
'
icons/arrows/north-east.svg
'
;
import
blocksIcon
from
'
icons/block.svg
'
;
import
gearIcon
from
'
icons/gear.svg
'
;
import
globeIcon
from
'
icons/globe-b.svg
'
;
import
graphQLIcon
from
'
icons/graphQL.svg
'
;
//
import outputRootsIcon from 'icons/output_roots.svg';
import
outputRootsIcon
from
'
icons/output_roots.svg
'
;
import
privateTagIcon
from
'
icons/privattags.svg
'
;
import
profileIcon
from
'
icons/profile.svg
'
;
import
publicTagIcon
from
'
icons/publictags.svg
'
;
...
...
@@ -22,10 +22,10 @@ import tokensIcon from 'icons/token.svg';
import
topAccountsIcon
from
'
icons/top-accounts.svg
'
;
import
transactionsIcon
from
'
icons/transactions.svg
'
;
// import depositsIcon from 'icons/arrows/south-east.svg';
//
import txnBatchIcon from 'icons/txn_batches.svg';
import
txnBatchIcon
from
'
icons/txn_batches.svg
'
;
import
verifiedIcon
from
'
icons/verified.svg
'
;
import
watchlistIcon
from
'
icons/watchlist.svg
'
;
//
import { rightLineArrow } from 'lib/html-entities';
import
{
rightLineArrow
}
from
'
lib/html-entities
'
;
type
NavItemCommon
=
{
text
:
string
;
...
...
@@ -83,14 +83,15 @@ export default function useNavItems(): ReturnType {
const
blocks
=
{
text
:
'
Blocks
'
,
nextRoute
:
{
pathname
:
'
/blocks
'
as
const
},
icon
:
blocksIcon
,
isActive
:
pathname
.
startsWith
(
'
/block
'
),
icon
:
blocksIcon
,
isActive
:
pathname
===
'
/blocks
'
||
pathname
===
'
/block/[height]
'
,
isNewUi
:
true
,
};
const
txs
=
{
text
:
'
Transactions
'
,
nextRoute
:
{
pathname
:
'
/txs
'
as
const
},
icon
:
transactionsIcon
,
isActive
:
pathname
.
startsWith
(
'
/tx
'
)
,
isActive
:
pathname
===
'
/txs
'
||
pathname
===
'
/tx/[hash]
'
,
isNewUi
:
true
,
};
const
verifiedContracts
=
...
...
@@ -104,14 +105,14 @@ export default function useNavItems(): ReturnType {
// eslint-disable-next-line max-len
// { text: `Deposits (L1${ rightLineArrow }L2)`, nextRoute: { pathname: '/deposits' as const }, icon: depositsIcon, isActive: pathname === '/deposits', isNewUi: true },
// eslint-disable-next-line max-len
//
{ text: `Withdrawals (L2${ rightLineArrow }L1)`, nextRoute: { pathname: '/withdrawals' as const }, icon: withdrawalsIcon, isActive: pathname === '/withdrawals', isNewUi: true },
{
text
:
`Withdrawals (L2
${
rightLineArrow
}
L1)`
,
nextRoute
:
{
pathname
:
'
/withdrawals
'
as
const
},
icon
:
withdrawalsIcon
,
isActive
:
pathname
===
'
/withdrawals
'
,
isNewUi
:
true
},
],
[
blocks
,
// eslint-disable-next-line max-len
//
{ text: 'Txn batches', nextRoute: { pathname: '/txn-batches' as const }, icon: txnBatchIcon, isActive: pathname === '/txn-batches', isNewUi: true },
{
text
:
'
Txn batches
'
,
nextRoute
:
{
pathname
:
'
/txn-batches
'
as
const
},
icon
:
txnBatchIcon
,
isActive
:
pathname
===
'
/txn-batches
'
,
isNewUi
:
true
},
// eslint-disable-next-line max-len
//
{ text: 'Output roots', nextRoute: { pathname: '/output-roots' as const }, icon: outputRootsIcon, isActive: pathname === '/output-roots', isNewUi: true },
{
text
:
'
Output roots
'
,
nextRoute
:
{
pathname
:
'
/output-roots
'
as
const
},
icon
:
outputRootsIcon
,
isActive
:
pathname
===
'
/output-roots
'
,
isNewUi
:
true
},
],
[
topAccounts
,
...
...
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