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
3a5184ea
Commit
3a5184ea
authored
Oct 05, 2022
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tabs query
parent
cadf8340
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
78 additions
and
336 deletions
+78
-336
useNavItems.tsx
lib/hooks/useNavItems.tsx
+2
-2
isAccountRoute.ts
lib/link/isAccountRoute.ts
+1
-1
routes.ts
lib/link/routes.ts
+4
-35
BlockNextPage.tsx
lib/next/block/BlockNextPage.tsx
+2
-4
BlocksNextPage.tsx
lib/next/blocks/BlocksNextPage.tsx
+2
-4
TransactionNextPage.tsx
lib/next/tx/TransactionNextPage.tsx
+2
-4
tag_address.tsx
...[network_type]/[network_sub_type]/account/tag_address.tsx
+1
-1
tag_transaction.tsx
...work_type]/[network_sub_type]/account/tag_transaction.tsx
+0
-30
[id].tsx
pages/[network_type]/[network_sub_type]/block/[id].tsx
+1
-1
index.tsx
pages/[network_type]/[network_sub_type]/block/[id]/index.tsx
+0
-21
blocks.tsx
pages/[network_type]/[network_sub_type]/blocks.tsx
+1
-1
pending-transactions.tsx
...network_type]/[network_sub_type]/pending-transactions.tsx
+0
-30
reorgs.tsx
pages/[network_type]/[network_sub_type]/reorgs.tsx
+0
-21
[id].tsx
pages/[network_type]/[network_sub_type]/tx/[id].tsx
+1
-1
internal-transactions.tsx
...ype]/[network_sub_type]/tx/[id]/internal-transactions.tsx
+0
-19
logs.tsx
pages/[network_type]/[network_sub_type]/tx/[id]/logs.tsx
+0
-19
raw-trace.tsx
...s/[network_type]/[network_sub_type]/tx/[id]/raw-trace.tsx
+0
-19
state.tsx
pages/[network_type]/[network_sub_type]/tx/[id]/state.tsx
+0
-19
txs.tsx
pages/[network_type]/[network_sub_type]/txs.tsx
+1
-1
uncles.tsx
pages/[network_type]/[network_sub_type]/uncles.tsx
+0
-21
BlockDetails.tsx
ui/block/BlockDetails.tsx
+1
-1
BlocksListItem.tsx
ui/blocks/BlocksListItem.tsx
+1
-1
BlocksTableItem.tsx
ui/blocks/BlocksTableItem.tsx
+1
-1
Block.tsx
ui/pages/Block.tsx
+3
-8
Blocks.tsx
ui/pages/Blocks.tsx
+4
-9
PrivateTags.tsx
ui/pages/PrivateTags.tsx
+4
-8
Transaction.tsx
ui/pages/Transaction.tsx
+7
-12
Transactions.tsx
ui/pages/Transactions.tsx
+4
-8
RoutedTabs.tsx
ui/shared/RoutedTabs/RoutedTabs.tsx
+25
-19
RoutedTabsMenu.tsx
ui/shared/RoutedTabs/RoutedTabsMenu.tsx
+2
-2
types.ts
ui/shared/RoutedTabs/types.ts
+2
-7
utils.ts
ui/shared/RoutedTabs/utils.ts
+1
-1
AddressLink.tsx
ui/shared/address/AddressLink.tsx
+2
-2
TxAdditionalInfo.tsx
ui/txs/TxAdditionalInfo.tsx
+1
-1
TxsListItem.tsx
ui/txs/TxsListItem.tsx
+1
-1
TxsTableItem.tsx
ui/txs/TxsTableItem.tsx
+1
-1
No files found.
lib/hooks/useNavItems.tsx
View file @
3a5184ea
...
@@ -32,7 +32,7 @@ export default function useNavItems() {
...
@@ -32,7 +32,7 @@ export default function useNavItems() {
return
React
.
useMemo
(()
=>
{
return
React
.
useMemo
(()
=>
{
const
mainNavItems
=
[
const
mainNavItems
=
[
{
text
:
'
Blocks
'
,
url
:
link
(
'
blocks
'
),
icon
:
blocksIcon
,
isActive
:
currentRoute
.
startsWith
(
'
block
'
)
},
{
text
:
'
Blocks
'
,
url
:
link
(
'
blocks
'
),
icon
:
blocksIcon
,
isActive
:
currentRoute
.
startsWith
(
'
block
'
)
},
{
text
:
'
Transactions
'
,
url
:
link
(
'
txs
_validated
'
),
icon
:
transactionsIcon
,
isActive
:
currentRoute
.
startsWith
(
'
tx
'
)
},
{
text
:
'
Transactions
'
,
url
:
link
(
'
txs
'
),
icon
:
transactionsIcon
,
isActive
:
currentRoute
.
startsWith
(
'
tx
'
)
},
{
text
:
'
Tokens
'
,
url
:
link
(
'
tokens
'
),
icon
:
tokensIcon
,
isActive
:
currentRoute
===
'
tokens
'
},
{
text
:
'
Tokens
'
,
url
:
link
(
'
tokens
'
),
icon
:
tokensIcon
,
isActive
:
currentRoute
===
'
tokens
'
},
isMarketplaceFilled
?
isMarketplaceFilled
?
{
text
:
'
Apps
'
,
url
:
link
(
'
apps
'
),
icon
:
appsIcon
,
isActive
:
currentRoute
===
'
apps
'
}
:
null
,
{
text
:
'
Apps
'
,
url
:
link
(
'
apps
'
),
icon
:
appsIcon
,
isActive
:
currentRoute
===
'
apps
'
}
:
null
,
...
@@ -44,7 +44,7 @@ export default function useNavItems() {
...
@@ -44,7 +44,7 @@ export default function useNavItems() {
const
accountNavItems
=
[
const
accountNavItems
=
[
{
text
:
'
Watchlist
'
,
url
:
link
(
'
watchlist
'
),
icon
:
watchlistIcon
,
isActive
:
currentRoute
===
'
watchlist
'
},
{
text
:
'
Watchlist
'
,
url
:
link
(
'
watchlist
'
),
icon
:
watchlistIcon
,
isActive
:
currentRoute
===
'
watchlist
'
},
{
text
:
'
Private tags
'
,
url
:
link
(
'
private_tags
_address
'
),
icon
:
privateTagIcon
,
isActive
:
currentRoute
.
startsWith
(
'
private_tags
'
)
},
{
text
:
'
Private tags
'
,
url
:
link
(
'
private_tags
'
),
icon
:
privateTagIcon
,
isActive
:
currentRoute
.
startsWith
(
'
private_tags
'
)
},
{
text
:
'
Public tags
'
,
url
:
link
(
'
public_tags
'
),
icon
:
publicTagIcon
,
isActive
:
currentRoute
===
'
public_tags
'
},
{
text
:
'
Public tags
'
,
url
:
link
(
'
public_tags
'
),
icon
:
publicTagIcon
,
isActive
:
currentRoute
===
'
public_tags
'
},
{
text
:
'
API keys
'
,
url
:
link
(
'
api_keys
'
),
icon
:
apiKeysIcon
,
isActive
:
currentRoute
===
'
api_keys
'
},
{
text
:
'
API keys
'
,
url
:
link
(
'
api_keys
'
),
icon
:
apiKeysIcon
,
isActive
:
currentRoute
===
'
api_keys
'
},
{
text
:
'
Custom ABI
'
,
url
:
link
(
'
custom_abi
'
),
icon
:
abiIcon
,
isActive
:
currentRoute
===
'
custom_abi
'
},
{
text
:
'
Custom ABI
'
,
url
:
link
(
'
custom_abi
'
),
icon
:
abiIcon
,
isActive
:
currentRoute
===
'
custom_abi
'
},
...
...
lib/link/isAccountRoute.ts
View file @
3a5184ea
export
const
ACCOUNT_ROUTES
:
Array
<
RouteName
>
=
[
'
watchlist
'
,
'
private_tags
_address
'
,
'
private_tags_tx
'
,
'
public_tags
'
,
'
api_keys
'
,
'
custom_abi
'
];
export
const
ACCOUNT_ROUTES
:
Array
<
RouteName
>
=
[
'
watchlist
'
,
'
private_tags
'
,
'
public_tags
'
,
'
api_keys
'
,
'
custom_abi
'
];
import
type
{
RouteName
}
from
'
lib/link/routes
'
;
import
type
{
RouteName
}
from
'
lib/link/routes
'
;
export
default
function
isAccountRoute
(
route
:
RouteName
)
{
export
default
function
isAccountRoute
(
route
:
RouteName
)
{
...
...
lib/link/routes.ts
View file @
3a5184ea
...
@@ -19,14 +19,10 @@ export const ROUTES = {
...
@@ -19,14 +19,10 @@ export const ROUTES = {
pattern
:
`
${
BASE_PATH
}
/account/watchlist`
,
pattern
:
`
${
BASE_PATH
}
/account/watchlist`
,
crossNetworkNavigation
:
true
,
crossNetworkNavigation
:
true
,
},
},
private_tags
_address
:
{
private_tags
:
{
pattern
:
`
${
BASE_PATH
}
/account/tag_address`
,
pattern
:
`
${
BASE_PATH
}
/account/tag_address`
,
crossNetworkNavigation
:
true
,
crossNetworkNavigation
:
true
,
},
},
private_tags_tx
:
{
pattern
:
`
${
BASE_PATH
}
/account/tag_transaction`
,
crossNetworkNavigation
:
true
,
},
public_tags
:
{
public_tags
:
{
pattern
:
`
${
BASE_PATH
}
/account/public_tags_request`
,
pattern
:
`
${
BASE_PATH
}
/account/public_tags_request`
,
crossNetworkNavigation
:
true
,
crossNetworkNavigation
:
true
,
...
@@ -45,49 +41,22 @@ export const ROUTES = {
...
@@ -45,49 +41,22 @@ export const ROUTES = {
},
},
// TRANSACTIONS
// TRANSACTIONS
txs
_validated
:
{
txs
:
{
pattern
:
`
${
BASE_PATH
}
/txs`
,
pattern
:
`
${
BASE_PATH
}
/txs`
,
crossNetworkNavigation
:
true
,
crossNetworkNavigation
:
true
,
},
},
txs_pending
:
{
tx
:
{
pattern
:
`
${
BASE_PATH
}
/pending-transactions`
,
crossNetworkNavigation
:
true
,
},
tx_index
:
{
pattern
:
`
${
BASE_PATH
}
/tx/[id]`
,
pattern
:
`
${
BASE_PATH
}
/tx/[id]`
,
},
},
tx_internal
:
{
pattern
:
`
${
BASE_PATH
}
/tx/[id]/internal-transactions`
,
},
tx_logs
:
{
pattern
:
`
${
BASE_PATH
}
/tx/[id]/logs`
,
},
tx_raw_trace
:
{
pattern
:
`
${
BASE_PATH
}
/tx/[id]/raw-trace`
,
},
tx_state
:
{
pattern
:
`
${
BASE_PATH
}
/tx/[id]/state`
,
},
// BLOCKS
// BLOCKS
blocks
:
{
blocks
:
{
pattern
:
`
${
BASE_PATH
}
/blocks`
,
pattern
:
`
${
BASE_PATH
}
/blocks`
,
crossNetworkNavigation
:
true
,
crossNetworkNavigation
:
true
,
},
},
blocks_uncles
:
{
block
:
{
pattern
:
`
${
BASE_PATH
}
/uncles`
,
crossNetworkNavigation
:
true
,
},
blocks_reorgs
:
{
pattern
:
`
${
BASE_PATH
}
/reorgs`
,
crossNetworkNavigation
:
true
,
},
block_index
:
{
pattern
:
`
${
BASE_PATH
}
/block/[id]`
,
pattern
:
`
${
BASE_PATH
}
/block/[id]`
,
},
},
block_txs
:
{
pattern
:
`
${
BASE_PATH
}
/block/[id]/transactions`
,
},
// TOKENS
// TOKENS
tokens
:
{
tokens
:
{
...
...
lib/next/block/BlockNextPage.tsx
View file @
3a5184ea
...
@@ -5,16 +5,14 @@ import React from 'react';
...
@@ -5,16 +5,14 @@ import React from 'react';
import
type
{
PageParams
}
from
'
./types
'
;
import
type
{
PageParams
}
from
'
./types
'
;
import
Block
from
'
ui/pages/Block
'
;
import
Block
from
'
ui/pages/Block
'
;
import
type
{
Props
as
BlockProps
}
from
'
ui/pages/Block
'
;
import
getSeo
from
'
./getSeo
'
;
import
getSeo
from
'
./getSeo
'
;
type
Props
=
{
type
Props
=
{
pageParams
:
PageParams
;
pageParams
:
PageParams
;
tab
:
BlockProps
[
'
tab
'
];
}
}
const
BlockNextPage
:
NextPage
<
Props
>
=
({
pageParams
,
tab
}:
Props
)
=>
{
const
BlockNextPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
{
title
,
description
}
=
getSeo
(
pageParams
);
const
{
title
,
description
}
=
getSeo
(
pageParams
);
return
(
return
(
<>
<>
...
@@ -22,7 +20,7 @@ const BlockNextPage: NextPage<Props> = ({ pageParams, tab }: Props) => {
...
@@ -22,7 +20,7 @@ const BlockNextPage: NextPage<Props> = ({ pageParams, tab }: Props) => {
<
title
>
{
title
}
</
title
>
<
title
>
{
title
}
</
title
>
<
meta
name=
"description"
content=
{
description
}
/>
<
meta
name=
"description"
content=
{
description
}
/>
</
Head
>
</
Head
>
<
Block
tab=
{
tab
}
/>
<
Block
/>
</>
</>
);
);
};
};
...
...
lib/next/blocks/BlocksNextPage.tsx
View file @
3a5184ea
...
@@ -5,23 +5,21 @@ import React from 'react';
...
@@ -5,23 +5,21 @@ import React from 'react';
import
type
{
PageParams
}
from
'
./types
'
;
import
type
{
PageParams
}
from
'
./types
'
;
import
Blocks
from
'
ui/pages/Blocks
'
;
import
Blocks
from
'
ui/pages/Blocks
'
;
import
type
{
Props
as
BlocksProps
}
from
'
ui/pages/Blocks
'
;
import
getSeo
from
'
./getSeo
'
;
import
getSeo
from
'
./getSeo
'
;
type
Props
=
{
type
Props
=
{
pageParams
:
PageParams
;
pageParams
:
PageParams
;
tab
:
BlocksProps
[
'
tab
'
];
}
}
const
BlocksNextPage
:
NextPage
<
Props
>
=
({
pageParams
,
tab
}:
Props
)
=>
{
const
BlocksNextPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
{
title
}
=
getSeo
(
pageParams
);
const
{
title
}
=
getSeo
(
pageParams
);
return
(
return
(
<>
<>
<
Head
>
<
Head
>
<
title
>
{
title
}
</
title
>
<
title
>
{
title
}
</
title
>
</
Head
>
</
Head
>
<
Blocks
tab=
{
tab
}
/>
<
Blocks
/>
</>
</>
);
);
};
};
...
...
lib/next/tx/TransactionNextPage.tsx
View file @
3a5184ea
...
@@ -4,17 +4,15 @@ import React from 'react';
...
@@ -4,17 +4,15 @@ import React from 'react';
import
type
{
PageParams
}
from
'
./types
'
;
import
type
{
PageParams
}
from
'
./types
'
;
import
type
{
Props
as
TransactionProps
}
from
'
ui/pages/Transaction
'
;
import
Transaction
from
'
ui/pages/Transaction
'
;
import
Transaction
from
'
ui/pages/Transaction
'
;
import
getSeo
from
'
./getSeo
'
;
import
getSeo
from
'
./getSeo
'
;
type
Props
=
{
type
Props
=
{
pageParams
:
PageParams
;
pageParams
:
PageParams
;
tab
:
TransactionProps
[
'
tab
'
];
}
}
const
TransactionNextPage
:
NextPage
<
Props
>
=
({
pageParams
,
tab
}:
Props
)
=>
{
const
TransactionNextPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
{
title
,
description
}
=
getSeo
(
pageParams
);
const
{
title
,
description
}
=
getSeo
(
pageParams
);
return
(
return
(
<>
<>
...
@@ -22,7 +20,7 @@ const TransactionNextPage: NextPage<Props> = ({ pageParams, tab }: Props) => {
...
@@ -22,7 +20,7 @@ const TransactionNextPage: NextPage<Props> = ({ pageParams, tab }: Props) => {
<
title
>
{
title
}
</
title
>
<
title
>
{
title
}
</
title
>
<
meta
name=
"description"
content=
{
description
}
/>
<
meta
name=
"description"
content=
{
description
}
/>
</
Head
>
</
Head
>
<
Transaction
tab=
{
tab
}
/>
<
Transaction
/>
</>
</>
);
);
};
};
...
...
pages/[network_type]/[network_sub_type]/account/tag_address.tsx
View file @
3a5184ea
...
@@ -19,7 +19,7 @@ const AddressTagsPage: NextPage<Props> = ({ pageParams }: Props) => {
...
@@ -19,7 +19,7 @@ const AddressTagsPage: NextPage<Props> = ({ pageParams }: Props) => {
return
(
return
(
<>
<>
<
Head
><
title
>
{
title
}
</
title
></
Head
>
<
Head
><
title
>
{
title
}
</
title
></
Head
>
<
PrivateTags
tab=
"private_tags_address"
/>
<
PrivateTags
/>
</>
</>
);
);
};
};
...
...
pages/[network_type]/[network_sub_type]/account/tag_transaction.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
PrivateTags
from
'
ui/pages/PrivateTags
'
;
type
PageParams
=
{
network_type
:
string
;
network_sub_type
:
string
;
}
type
Props
=
{
pageParams
:
PageParams
;
}
const
TransactionTagsPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
title
=
getNetworkTitle
(
pageParams
||
{});
return
(
<>
<
Head
><
title
>
{
title
}
</
title
></
Head
>
<
PrivateTags
tab=
"private_tags_tx"
/>
</>
);
};
export
default
TransactionTagsPage
;
export
{
getStaticPaths
}
from
'
lib/next/account/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/block/[id]
/transactions
.tsx
→
pages/[network_type]/[network_sub_type]/block/[id].tsx
View file @
3a5184ea
...
@@ -11,7 +11,7 @@ type Props = {
...
@@ -11,7 +11,7 @@ type Props = {
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
return
(
<
BlockNextPage
tab=
"block_txs"
pageParams=
{
pageParams
}
/>
<
BlockNextPage
pageParams=
{
pageParams
}
/>
);
);
};
};
...
...
pages/[network_type]/[network_sub_type]/block/[id]/index.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
BlockNextPage
from
'
lib/next/block/BlockNextPage
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
<
BlockNextPage
tab=
"block_index"
pageParams=
{
pageParams
}
/>
);
};
export
default
BlockPage
;
export
{
getStaticPaths
}
from
'
lib/next/block/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/blocks.tsx
View file @
3a5184ea
...
@@ -11,7 +11,7 @@ type Props = {
...
@@ -11,7 +11,7 @@ type Props = {
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
return
(
<
BlocksNextPage
tab=
"blocks"
pageParams=
{
pageParams
}
/>
<
BlocksNextPage
pageParams=
{
pageParams
}
/>
);
);
};
};
...
...
pages/[network_type]/[network_sub_type]/pending-transactions.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
Head
from
'
next/head
'
;
import
React
from
'
react
'
;
import
getNetworkTitle
from
'
lib/networks/getNetworkTitle
'
;
import
Transactions
from
'
ui/pages/Transactions
'
;
type
PageParams
=
{
network_type
:
string
;
network_sub_type
:
string
;
}
type
Props
=
{
pageParams
:
PageParams
;
}
const
AddressTagsPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
title
=
getNetworkTitle
(
pageParams
||
{});
return
(
<>
<
Head
><
title
>
{
title
}
</
title
></
Head
>
<
Transactions
tab=
"txs_pending"
/>
</>
);
};
export
default
AddressTagsPage
;
export
{
getStaticPaths
}
from
'
lib/next/account/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/reorgs.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
BlocksNextPage
from
'
lib/next/blocks/BlocksNextPage
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
<
BlocksNextPage
tab=
"blocks_reorgs"
pageParams=
{
pageParams
}
/>
);
};
export
default
BlockPage
;
export
{
getStaticPaths
}
from
'
lib/next/block/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/tx/[id]
/index
.tsx
→
pages/[network_type]/[network_sub_type]/tx/[id].tsx
View file @
3a5184ea
...
@@ -11,7 +11,7 @@ type Props = {
...
@@ -11,7 +11,7 @@ type Props = {
const
TransactionPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
const
TransactionPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
return
(
<
TransactionNextPage
tab=
"tx_index"
pageParams=
{
pageParams
}
/>
<
TransactionNextPage
pageParams=
{
pageParams
}
/>
);
);
};
};
...
...
pages/[network_type]/[network_sub_type]/tx/[id]/internal-transactions.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
TransactionNextPage
from
'
lib/next/tx/TransactionNextPage
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
TransactionPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
<
TransactionNextPage
pageParams=
{
pageParams
}
tab=
"tx_internal"
/>;
};
export
default
TransactionPage
;
export
{
getStaticPaths
}
from
'
lib/next/tx/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/tx/[id]/logs.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
TransactionNextPage
from
'
lib/next/tx/TransactionNextPage
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
TransactionPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
<
TransactionNextPage
pageParams=
{
pageParams
}
tab=
"tx_logs"
/>;
};
export
default
TransactionPage
;
export
{
getStaticPaths
}
from
'
lib/next/tx/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/tx/[id]/raw-trace.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
TransactionNextPage
from
'
lib/next/tx/TransactionNextPage
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
TransactionPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
<
TransactionNextPage
pageParams=
{
pageParams
}
tab=
"tx_raw_trace"
/>;
};
export
default
TransactionPage
;
export
{
getStaticPaths
}
from
'
lib/next/tx/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/tx/[id]/state.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
TransactionNextPage
from
'
lib/next/tx/TransactionNextPage
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
TransactionPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
<
TransactionNextPage
pageParams=
{
pageParams
}
tab=
"tx_state"
/>;
};
export
default
TransactionPage
;
export
{
getStaticPaths
}
from
'
lib/next/tx/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
pages/[network_type]/[network_sub_type]/txs.tsx
View file @
3a5184ea
...
@@ -19,7 +19,7 @@ const AddressTagsPage: NextPage<Props> = ({ pageParams }: Props) => {
...
@@ -19,7 +19,7 @@ const AddressTagsPage: NextPage<Props> = ({ pageParams }: Props) => {
return
(
return
(
<>
<>
<
Head
><
title
>
{
title
}
</
title
></
Head
>
<
Head
><
title
>
{
title
}
</
title
></
Head
>
<
Transactions
tab=
"txs_validated"
/>
<
Transactions
/>
</>
</>
);
);
};
};
...
...
pages/[network_type]/[network_sub_type]/uncles.tsx
deleted
100644 → 0
View file @
cadf8340
import
type
{
NextPage
}
from
'
next
'
;
import
React
from
'
react
'
;
import
type
{
PageParams
}
from
'
lib/next/tx/types
'
;
import
BlocksNextPage
from
'
lib/next/blocks/BlocksNextPage
'
;
type
Props
=
{
pageParams
:
PageParams
;
}
const
BlockPage
:
NextPage
<
Props
>
=
({
pageParams
}:
Props
)
=>
{
return
(
<
BlocksNextPage
tab=
"blocks_uncles"
pageParams=
{
pageParams
}
/>
);
};
export
default
BlockPage
;
export
{
getStaticPaths
}
from
'
lib/next/block/getStaticPaths
'
;
export
{
getStaticProps
}
from
'
lib/next/getStaticProps
'
;
ui/block/BlockDetails.tsx
View file @
3a5184ea
...
@@ -63,7 +63,7 @@ const BlockDetails = () => {
...
@@ -63,7 +63,7 @@ const BlockDetails = () => {
title=
"Transactions"
title=
"Transactions"
hint=
"The number of transactions in the block."
hint=
"The number of transactions in the block."
>
>
<
Link
href=
{
link
(
'
block
_txs
'
,
{
id
:
router
.
query
.
id
})
}
>
<
Link
href=
{
link
(
'
block
'
,
{
id
:
router
.
query
.
id
},
{
tab
:
'
transactions
'
})
}
>
{
block
.
transactionsNum
}
transactions
{
block
.
transactionsNum
}
transactions
</
Link
>
</
Link
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
...
...
ui/blocks/BlocksListItem.tsx
View file @
3a5184ea
...
@@ -30,7 +30,7 @@ const BlocksListItem = ({ data, isPending }: Props) => {
...
@@ -30,7 +30,7 @@ const BlocksListItem = ({ data, isPending }: Props) => {
{
isPending
&&
<
Spinner
size=
"sm"
color=
"blue.500"
emptyColor=
{
spinnerEmptyColor
}
/>
}
{
isPending
&&
<
Spinner
size=
"sm"
color=
"blue.500"
emptyColor=
{
spinnerEmptyColor
}
/>
}
<
Link
<
Link
fontWeight=
{
600
}
fontWeight=
{
600
}
href=
{
link
(
'
block
_index
'
,
{
id
:
String
(
data
.
height
)
})
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
height
)
})
}
>
>
{
data
.
height
}
{
data
.
height
}
</
Link
>
</
Link
>
...
...
ui/blocks/BlocksTableItem.tsx
View file @
3a5184ea
...
@@ -28,7 +28,7 @@ const BlocksTableItem = ({ data, isPending }: Props) => {
...
@@ -28,7 +28,7 @@ const BlocksTableItem = ({ data, isPending }: Props) => {
{
isPending
&&
<
Spinner
size=
"sm"
color=
"blue.500"
emptyColor=
{
spinnerEmptyColor
}
/>
}
{
isPending
&&
<
Spinner
size=
"sm"
color=
"blue.500"
emptyColor=
{
spinnerEmptyColor
}
/>
}
<
Link
<
Link
fontWeight=
{
600
}
fontWeight=
{
600
}
href=
{
link
(
'
block
_index
'
,
{
id
:
String
(
data
.
height
)
})
}
href=
{
link
(
'
block
'
,
{
id
:
String
(
data
.
height
)
})
}
>
>
{
data
.
height
}
{
data
.
height
}
</
Link
>
</
Link
>
...
...
ui/pages/Block.tsx
View file @
3a5184ea
...
@@ -10,15 +10,11 @@ import PageTitle from 'ui/shared/Page/PageTitle';
...
@@ -10,15 +10,11 @@ import PageTitle from 'ui/shared/Page/PageTitle';
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
const
TABS
:
Array
<
RoutedTab
>
=
[
const
TABS
:
Array
<
RoutedTab
>
=
[
{
routeName
:
'
block_
index
'
,
title
:
'
Details
'
,
component
:
<
BlockDetails
/>
},
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
BlockDetails
/>
},
{
routeName
:
'
block_
txs
'
,
title
:
'
Transactions
'
,
component
:
<
BlockTxs
/>
},
{
id
:
'
txs
'
,
title
:
'
Transactions
'
,
component
:
<
BlockTxs
/>
},
];
];
export
interface
Props
{
const
BlockPageContent
=
()
=>
{
tab
:
RoutedTab
[
'
routeName
'
];
}
const
BlockPageContent
=
({
tab
}:
Props
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
return
(
return
(
...
@@ -26,7 +22,6 @@ const BlockPageContent = ({ tab }: Props) => {
...
@@ -26,7 +22,6 @@ const BlockPageContent = ({ tab }: Props) => {
<
PageTitle
text=
{
`Block #${ router.query.id || '' }`
}
/>
<
PageTitle
text=
{
`Block #${ router.query.id || '' }`
}
/>
<
RoutedTabs
<
RoutedTabs
tabs=
{
TABS
}
tabs=
{
TABS
}
defaultActiveTab=
{
tab
}
/>
/>
</
Page
>
</
Page
>
);
);
...
...
ui/pages/Blocks.tsx
View file @
3a5184ea
...
@@ -8,22 +8,17 @@ import PageTitle from 'ui/shared/Page/PageTitle';
...
@@ -8,22 +8,17 @@ import PageTitle from 'ui/shared/Page/PageTitle';
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
const
TABS
:
Array
<
RoutedTab
>
=
[
const
TABS
:
Array
<
RoutedTab
>
=
[
{
routeName
:
'
blocks
'
,
title
:
'
All
'
,
component
:
<
BlocksContent
/>
},
{
id
:
'
blocks
'
,
title
:
'
All
'
,
component
:
<
BlocksContent
/>
},
{
routeName
:
'
blocks_
reorgs
'
,
title
:
'
Forked
'
,
component
:
<
BlocksContent
/>
},
{
id
:
'
reorgs
'
,
title
:
'
Forked
'
,
component
:
<
BlocksContent
/>
},
{
routeName
:
'
blocks_
uncles
'
,
title
:
'
Uncles
'
,
component
:
<
BlocksContent
/>
},
{
id
:
'
uncles
'
,
title
:
'
Uncles
'
,
component
:
<
BlocksContent
/>
},
];
];
export
interface
Props
{
const
BlocksPageContent
=
()
=>
{
tab
:
RoutedTab
[
'
routeName
'
];
}
const
BlocksPageContent
=
({
tab
}:
Props
)
=>
{
return
(
return
(
<
Page
>
<
Page
>
<
PageTitle
text=
"Blocks"
/>
<
PageTitle
text=
"Blocks"
/>
<
RoutedTabs
<
RoutedTabs
tabs=
{
TABS
}
tabs=
{
TABS
}
defaultActiveTab=
{
tab
}
/>
/>
</
Page
>
</
Page
>
);
);
...
...
ui/pages/PrivateTags.tsx
View file @
3a5184ea
...
@@ -9,19 +9,15 @@ import PageTitle from 'ui/shared/Page/PageTitle';
...
@@ -9,19 +9,15 @@ import PageTitle from 'ui/shared/Page/PageTitle';
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
import
RoutedTabs
from
'
ui/shared/RoutedTabs/RoutedTabs
'
;
const
TABS
:
Array
<
RoutedTab
>
=
[
const
TABS
:
Array
<
RoutedTab
>
=
[
{
routeName
:
'
private_tags_
address
'
,
title
:
'
Address
'
,
component
:
<
PrivateAddressTags
/>
},
{
id
:
'
address
'
,
title
:
'
Address
'
,
component
:
<
PrivateAddressTags
/>
},
{
routeName
:
'
private_tags_
tx
'
,
title
:
'
Transaction
'
,
component
:
<
PrivateTransactionTags
/>
},
{
id
:
'
tx
'
,
title
:
'
Transaction
'
,
component
:
<
PrivateTransactionTags
/>
},
];
];
type
Props
=
{
const
PrivateTags
=
()
=>
{
tab
:
RoutedTab
[
'
routeName
'
];
}
const
PrivateTags
=
({
tab
}:
Props
)
=>
{
return
(
return
(
<
Page
>
<
Page
>
<
PageTitle
text=
"Private tags"
/>
<
PageTitle
text=
"Private tags"
/>
<
RoutedTabs
tabs=
{
TABS
}
defaultActiveTab=
{
tab
}
/>
<
RoutedTabs
tabs=
{
TABS
}
/>
</
Page
>
</
Page
>
);
);
};
};
...
...
ui/pages/Transaction.tsx
View file @
3a5184ea
...
@@ -16,24 +16,20 @@ import TxRawTrace from 'ui/tx/TxRawTrace';
...
@@ -16,24 +16,20 @@ import TxRawTrace from 'ui/tx/TxRawTrace';
import
TxState
from
'
ui/tx/TxState
'
;
import
TxState
from
'
ui/tx/TxState
'
;
const
TABS
:
Array
<
RoutedTab
>
=
[
const
TABS
:
Array
<
RoutedTab
>
=
[
{
routeName
:
'
tx_
index
'
,
title
:
'
Details
'
,
component
:
<
TxDetails
/>
},
{
id
:
'
index
'
,
title
:
'
Details
'
,
component
:
<
TxDetails
/>
},
{
routeName
:
'
tx_
internal
'
,
title
:
'
Internal txn
'
,
component
:
<
TxInternals
/>
},
{
id
:
'
internal
'
,
title
:
'
Internal txn
'
,
component
:
<
TxInternals
/>
},
{
routeName
:
'
tx_
logs
'
,
title
:
'
Logs
'
,
component
:
<
TxLogs
/>
},
{
id
:
'
logs
'
,
title
:
'
Logs
'
,
component
:
<
TxLogs
/>
},
{
routeName
:
'
tx_
state
'
,
title
:
'
State
'
,
component
:
<
TxState
/>
},
{
id
:
'
state
'
,
title
:
'
State
'
,
component
:
<
TxState
/>
},
{
routeName
:
'
tx_
raw_trace
'
,
title
:
'
Raw trace
'
,
component
:
<
TxRawTrace
/>
},
{
id
:
'
raw_trace
'
,
title
:
'
Raw trace
'
,
component
:
<
TxRawTrace
/>
},
];
];
export
interface
Props
{
const
TransactionPageContent
=
()
=>
{
tab
:
RoutedTab
[
'
routeName
'
];
}
const
TransactionPageContent
=
({
tab
}:
Props
)
=>
{
const
link
=
useLink
();
const
link
=
useLink
();
return
(
return
(
<
Page
>
<
Page
>
{
/* TODO should be shown only when navigating from txs list */
}
{
/* TODO should be shown only when navigating from txs list */
}
<
Link
mb=
{
6
}
display=
"inline-flex"
href=
{
link
(
'
txs
_validated
'
)
}
>
<
Link
mb=
{
6
}
display=
"inline-flex"
href=
{
link
(
'
txs
'
)
}
>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
mr=
{
2
}
transform=
"rotate(180deg)"
/>
<
Icon
as=
{
eastArrowIcon
}
boxSize=
{
6
}
mr=
{
2
}
transform=
"rotate(180deg)"
/>
Transactions
Transactions
</
Link
>
</
Link
>
...
@@ -55,7 +51,6 @@ const TransactionPageContent = ({ tab }: Props) => {
...
@@ -55,7 +51,6 @@ const TransactionPageContent = ({ tab }: Props) => {
</
Flex
>
</
Flex
>
<
RoutedTabs
<
RoutedTabs
tabs=
{
TABS
}
tabs=
{
TABS
}
defaultActiveTab=
{
tab
}
/>
/>
</
Page
>
</
Page
>
);
);
...
...
ui/pages/Transactions.tsx
View file @
3a5184ea
...
@@ -12,21 +12,17 @@ import TxsPending from 'ui/txs/TxsPending';
...
@@ -12,21 +12,17 @@ import TxsPending from 'ui/txs/TxsPending';
import
TxsValidated
from
'
ui/txs/TxsValidated
'
;
import
TxsValidated
from
'
ui/txs/TxsValidated
'
;
const
TABS
:
Array
<
RoutedTab
>
=
[
const
TABS
:
Array
<
RoutedTab
>
=
[
{
routeName
:
'
txs_
validated
'
,
title
:
'
Validated
'
,
component
:
<
TxsValidated
/>
},
{
id
:
'
validated
'
,
title
:
'
Validated
'
,
component
:
<
TxsValidated
/>
},
{
routeName
:
'
txs_
pending
'
,
title
:
'
Pending
'
,
component
:
<
TxsPending
/>
},
{
id
:
'
pending
'
,
title
:
'
Pending
'
,
component
:
<
TxsPending
/>
},
];
];
type
Props
=
{
const
Transactions
=
()
=>
{
tab
:
RoutedTab
[
'
routeName
'
];
}
const
Transactions
=
({
tab
}:
Props
)
=>
{
return
(
return
(
<
Page
>
<
Page
>
<
Box
h=
"100%"
>
<
Box
h=
"100%"
>
<
PageTitle
text=
"Transactions"
/>
<
PageTitle
text=
"Transactions"
/>
<
RoutedTabs
tabs=
{
TABS
}
defaultActiveTab=
{
tab
}
/>
<
RoutedTabs
tabs=
{
TABS
}
/>
</
Box
>
</
Box
>
</
Page
>
</
Page
>
);
);
...
...
ui/shared/RoutedTabs/RoutedTabs.tsx
View file @
3a5184ea
...
@@ -7,12 +7,11 @@ import {
...
@@ -7,12 +7,11 @@ import {
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
type
{
StyleProps
}
from
'
@chakra-ui/styled-system
'
;
import
type
{
StyleProps
}
from
'
@chakra-ui/styled-system
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
type
{
RoutedTab
}
from
'
./types
'
;
import
type
{
RoutedTab
}
from
'
./types
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
{
link
}
from
'
lib/link/link
'
;
import
RoutedTabsMenu
from
'
./RoutedTabsMenu
'
;
import
RoutedTabsMenu
from
'
./RoutedTabsMenu
'
;
import
useAdaptiveTabs
from
'
./useAdaptiveTabs
'
;
import
useAdaptiveTabs
from
'
./useAdaptiveTabs
'
;
...
@@ -26,29 +25,36 @@ const hiddenItemStyles: StyleProps = {
...
@@ -26,29 +25,36 @@ const hiddenItemStyles: StyleProps = {
interface
Props
{
interface
Props
{
tabs
:
Array
<
RoutedTab
>
;
tabs
:
Array
<
RoutedTab
>
;
defaultActiveTab
:
RoutedTab
[
'
routeName
'
];
}
}
const
RoutedTabs
=
({
tabs
,
defaultActiveTab
}:
Props
)
=>
{
const
RoutedTabs
=
({
tabs
}:
Props
)
=>
{
const
defaultIndex
=
tabs
.
findIndex
(({
routeName
})
=>
routeName
===
defaultActiveTab
);
const
router
=
useRouter
();
const
isMobile
=
useIsMobile
();
const
[
activeTabIndex
,
setActiveTabIndex
]
=
useState
<
number
>
(
tabs
.
length
+
1
);
useEffect
(()
=>
{
if
(
router
.
isReady
)
{
let
tabIndex
=
0
;
if
(
router
.
query
.
tab
)
{
tabIndex
=
tabs
.
findIndex
(({
id
})
=>
id
===
router
.
query
.
tab
);
if
(
tabIndex
<
0
)
{
tabIndex
=
0
;
}
}
setActiveTabIndex
(
tabIndex
);
}
},
[
tabs
,
router
]);
const
[
activeTab
]
=
React
.
useState
<
number
>
(
defaultIndex
);
const
isMobile
=
useIsMobile
(
);
const
{
tabsCut
,
tabsList
,
tabsRefs
,
listRef
}
=
useAdaptiveTabs
(
tabs
,
isMobile
);
const
{
tabsCut
,
tabsList
,
tabsRefs
,
listRef
}
=
useAdaptiveTabs
(
tabs
,
isMobile
);
const
router
=
useRouter
();
const
handleTabChange
=
React
.
useCallback
((
index
:
number
)
=>
{
const
handleTabChange
=
React
.
useCallback
((
index
:
number
)
=>
{
const
nextTab
=
tabs
[
index
];
const
nextTab
=
tabs
[
index
];
if
(
nextTab
.
routeName
)
{
router
.
query
.
tab
=
nextTab
.
id
;
const
newUrl
=
link
(
nextTab
.
routeName
,
router
.
query
);
router
.
push
(
router
);
router
.
push
(
newUrl
,
undefined
,
{
shallow
:
true
});
}
},
[
tabs
,
router
]);
},
[
tabs
,
router
]);
return
(
return
(
<
Tabs
variant=
"soft-rounded"
colorScheme=
"blue"
isLazy
onChange=
{
handleTabChange
}
index=
{
activeTab
}
>
<
Tabs
variant=
"soft-rounded"
colorScheme=
"blue"
isLazy
onChange=
{
handleTabChange
}
index=
{
activeTab
Index
}
>
<
TabList
<
TabList
marginBottom=
{
{
base
:
6
,
lg
:
12
}
}
marginBottom=
{
{
base
:
6
,
lg
:
12
}
}
flexWrap=
"nowrap"
flexWrap=
"nowrap"
...
@@ -68,14 +74,14 @@ const RoutedTabs = ({ tabs, defaultActiveTab }: Props) => {
...
@@ -68,14 +74,14 @@ const RoutedTabs = ({ tabs, defaultActiveTab }: Props) => {
}
}
}
}
>
>
{
tabsList
.
map
((
tab
,
index
)
=>
{
{
tabsList
.
map
((
tab
,
index
)
=>
{
if
(
!
tab
.
routeName
)
{
if
(
!
tab
.
id
)
{
return
(
return
(
<
RoutedTabsMenu
<
RoutedTabsMenu
key=
"menu"
key=
"menu"
tabs=
{
tabs
}
tabs=
{
tabs
}
activeTab=
{
tabs
[
activeTab
]
}
activeTab=
{
tabs
[
activeTab
Index
]
}
tabsCut=
{
tabsCut
}
tabsCut=
{
tabsCut
}
isActive=
{
activeTab
>=
tabsCut
}
isActive=
{
activeTab
Index
>=
tabsCut
}
styles=
{
tabsCut
<
tabs
.
length
?
styles=
{
tabsCut
<
tabs
.
length
?
// initially our cut is 0 and we don't want to show the menu button too
// initially our cut is 0 and we don't want to show the menu button too
// but we want to keep it in the tabs row so it won't collapse
// but we want to keep it in the tabs row so it won't collapse
...
@@ -91,7 +97,7 @@ const RoutedTabs = ({ tabs, defaultActiveTab }: Props) => {
...
@@ -91,7 +97,7 @@ const RoutedTabs = ({ tabs, defaultActiveTab }: Props) => {
return
(
return
(
<
Tab
<
Tab
key=
{
tab
.
routeName
}
key=
{
tab
.
id
}
ref=
{
tabsRefs
[
index
]
}
ref=
{
tabsRefs
[
index
]
}
{
...
(
index
<
tabsCut
?
{}
:
hiddenItemStyles
)
}
{
...
(
index
<
tabsCut
?
{}
:
hiddenItemStyles
)
}
scrollSnapAlign=
"start"
scrollSnapAlign=
"start"
...
@@ -102,7 +108,7 @@ const RoutedTabs = ({ tabs, defaultActiveTab }: Props) => {
...
@@ -102,7 +108,7 @@ const RoutedTabs = ({ tabs, defaultActiveTab }: Props) => {
})
}
})
}
</
TabList
>
</
TabList
>
<
TabPanels
>
<
TabPanels
>
{
tabsList
.
map
((
tab
)
=>
<
TabPanel
padding=
{
0
}
key=
{
tab
.
routeName
}
>
{
tab
.
component
}
</
TabPanel
>)
}
{
tabsList
.
map
((
tab
)
=>
<
TabPanel
padding=
{
0
}
key=
{
tab
.
id
}
>
{
tab
.
component
}
</
TabPanel
>)
}
</
TabPanels
>
</
TabPanels
>
</
Tabs
>
</
Tabs
>
);
);
...
...
ui/shared/RoutedTabs/RoutedTabsMenu.tsx
View file @
3a5184ea
...
@@ -49,10 +49,10 @@ const RoutedTabsMenu = ({ tabs, tabsCut, isActive, styles, onItemClick, buttonRe
...
@@ -49,10 +49,10 @@ const RoutedTabsMenu = ({ tabs, tabsCut, isActive, styles, onItemClick, buttonRe
<
PopoverBody
display=
"flex"
flexDir=
"column"
>
<
PopoverBody
display=
"flex"
flexDir=
"column"
>
{
tabs
.
slice
(
tabsCut
).
map
((
tab
,
index
)
=>
(
{
tabs
.
slice
(
tabsCut
).
map
((
tab
,
index
)
=>
(
<
Button
<
Button
key=
{
tab
.
routeName
}
key=
{
tab
.
id
}
variant=
"ghost"
variant=
"ghost"
onClick=
{
handleItemClick
}
onClick=
{
handleItemClick
}
isActive=
{
activeTab
.
routeName
===
tab
.
routeName
}
isActive=
{
activeTab
.
id
===
tab
.
id
}
justifyContent=
"left"
justifyContent=
"left"
data
-
index=
{
index
}
data
-
index=
{
index
}
>
>
...
...
ui/shared/RoutedTabs/types.ts
View file @
3a5184ea
import
type
{
RouteName
}
from
'
lib/link/routes
'
;
export
interface
RoutedTab
{
export
interface
RoutedTab
{
// for simplicity we use routeName as an id
id
:
string
;
// if we migrate to non-Next.js router that should be revised
// id: string;
routeName
:
RouteName
|
null
;
title
:
string
;
title
:
string
;
component
:
React
.
ReactNode
;
component
:
React
.
ReactNode
;
}
}
export
interface
MenuButton
{
export
interface
MenuButton
{
routeName
:
null
;
id
:
null
;
title
:
string
;
title
:
string
;
component
:
null
;
component
:
null
;
}
}
ui/shared/RoutedTabs/utils.ts
View file @
3a5184ea
...
@@ -3,7 +3,7 @@ import type { MenuButton } from './types';
...
@@ -3,7 +3,7 @@ import type { MenuButton } from './types';
import
{
middot
}
from
'
lib/html-entities
'
;
import
{
middot
}
from
'
lib/html-entities
'
;
export
const
menuButton
:
MenuButton
=
{
export
const
menuButton
:
MenuButton
=
{
routeName
:
null
,
id
:
null
,
title
:
`
${
middot
}${
middot
}${
middot
}
`
,
title
:
`
${
middot
}${
middot
}${
middot
}
`
,
component
:
null
,
component
:
null
,
};
};
ui/shared/address/AddressLink.tsx
View file @
3a5184ea
...
@@ -19,11 +19,11 @@ const AddressLink = ({ alias, type, className, truncation = 'dynamic', hash, id,
...
@@ -19,11 +19,11 @@ const AddressLink = ({ alias, type, className, truncation = 'dynamic', hash, id,
const
link
=
useLink
();
const
link
=
useLink
();
let
url
;
let
url
;
if
(
type
===
'
transaction
'
)
{
if
(
type
===
'
transaction
'
)
{
url
=
link
(
'
tx
_index
'
,
{
id
:
id
||
hash
});
url
=
link
(
'
tx
'
,
{
id
:
id
||
hash
});
}
else
if
(
type
===
'
token
'
)
{
}
else
if
(
type
===
'
token
'
)
{
url
=
link
(
'
token_index
'
,
{
id
:
id
||
hash
});
url
=
link
(
'
token_index
'
,
{
id
:
id
||
hash
});
}
else
if
(
type
===
'
block
'
)
{
}
else
if
(
type
===
'
block
'
)
{
url
=
link
(
'
block
_index
'
,
{
id
:
id
||
hash
});
url
=
link
(
'
block
'
,
{
id
:
id
||
hash
});
}
else
{
}
else
{
url
=
link
(
'
address_index
'
,
{
id
:
id
||
hash
});
url
=
link
(
'
address_index
'
,
{
id
:
id
||
hash
});
}
}
...
...
ui/txs/TxAdditionalInfo.tsx
View file @
3a5184ea
...
@@ -79,7 +79,7 @@ const TxAdditionalInfo = ({ tx }: { tx: ArrayElement<typeof txs> }) => {
...
@@ -79,7 +79,7 @@ const TxAdditionalInfo = ({ tx }: { tx: ArrayElement<typeof txs> }) => {
<
Text
fontWeight=
"600"
as=
"span"
>
{
tx
.
position
}
</
Text
>
<
Text
fontWeight=
"600"
as=
"span"
>
{
tx
.
position
}
</
Text
>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
<
Link
fontSize=
"sm"
href=
{
link
(
'
tx
_index
'
,
{
id
:
tx
.
hash
})
}
>
More details
</
Link
>
<
Link
fontSize=
"sm"
href=
{
link
(
'
tx
'
,
{
id
:
tx
.
hash
})
}
>
More details
</
Link
>
</>
</>
);
);
};
};
...
...
ui/txs/TxsListItem.tsx
View file @
3a5184ea
...
@@ -79,7 +79,7 @@ const TxsListItem = ({ tx }: {tx: ArrayElement<typeof txs>}) => {
...
@@ -79,7 +79,7 @@ const TxsListItem = ({ tx }: {tx: ArrayElement<typeof txs>}) => {
</
Flex
>
</
Flex
>
<
Box
mt=
{
2
}
>
<
Box
mt=
{
2
}
>
<
Text
as=
"span"
>
Block
</
Text
>
<
Text
as=
"span"
>
Block
</
Text
>
<
Link
href=
{
link
(
'
block
_index
'
,
{
id
:
tx
.
block_num
.
toString
()
})
}
>
{
tx
.
block_num
}
</
Link
>
<
Link
href=
{
link
(
'
block
'
,
{
id
:
tx
.
block_num
.
toString
()
})
}
>
{
tx
.
block_num
}
</
Link
>
</
Box
>
</
Box
>
<
Flex
alignItems=
"center"
height=
{
6
}
mt=
{
6
}
>
<
Flex
alignItems=
"center"
height=
{
6
}
mt=
{
6
}
>
<
Address
width=
"calc((100%-40px)/2)"
>
<
Address
width=
"calc((100%-40px)/2)"
>
...
...
ui/txs/TxsTableItem.tsx
View file @
3a5184ea
...
@@ -104,7 +104,7 @@ const TxsTableItem = ({ tx }: {tx: ArrayElement<typeof txs>}) => {
...
@@ -104,7 +104,7 @@ const TxsTableItem = ({ tx }: {tx: ArrayElement<typeof txs>}) => {
</
TruncatedTextTooltip
>
</
TruncatedTextTooltip
>
</
Td
>
</
Td
>
<
Td
>
<
Td
>
<
Link
href=
{
link
(
'
block
_index
'
,
{
id
:
tx
.
block_num
.
toString
()
})
}
>
{
tx
.
block_num
}
</
Link
>
<
Link
href=
{
link
(
'
block
'
,
{
id
:
tx
.
block_num
.
toString
()
})
}
>
{
tx
.
block_num
}
</
Link
>
</
Td
>
</
Td
>
<
Show
above=
"xl"
>
<
Show
above=
"xl"
>
<
Td
>
<
Td
>
...
...
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