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
c1867134
Unverified
Commit
c1867134
authored
Oct 16, 2023
by
Igor Stuev
Committed by
GitHub
Oct 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tabs counters type (#1284)
Co-authored-by:
isstuev
<
natix.naf@gmail.com
>
parent
1b4fb34e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
15 deletions
+12
-15
address.ts
stubs/address.ts
+0
-1
address.ts
types/api/address.ts
+7
-8
Address.tsx
ui/pages/Address.tsx
+0
-1
TabCounter.tsx
ui/shared/Tabs/TabCounter.tsx
+4
-4
types.ts
ui/shared/Tabs/types.ts
+1
-1
No files found.
stubs/address.ts
View file @
c1867134
...
...
@@ -43,7 +43,6 @@ export const ADDRESS_COUNTERS: AddressCounters = {
};
export
const
ADDRESS_TABS_COUNTERS
:
AddressTabsCounters
=
{
coin_balances_count
:
10
,
internal_txs_count
:
10
,
logs_count
:
10
,
token_balances_count
:
10
,
...
...
types/api/address.ts
View file @
c1867134
...
...
@@ -152,12 +152,11 @@ export type AddressWithdrawalsItem = {
}
export
type
AddressTabsCounters
=
{
coin_balances_count
:
number
;
internal_txs_count
:
number
;
logs_count
:
number
;
token_balances_count
:
number
;
token_transfers_count
:
number
;
transactions_count
:
number
;
validations_count
:
number
;
withdrawals_count
:
number
;
internal_txs_count
:
number
|
null
;
logs_count
:
number
|
null
;
token_balances_count
:
number
|
null
;
token_transfers_count
:
number
|
null
;
transactions_count
:
number
|
null
;
validations_count
:
number
|
null
;
withdrawals_count
:
number
|
null
;
}
ui/pages/Address.tsx
View file @
c1867134
...
...
@@ -105,7 +105,6 @@ const AddressPageContent = () => {
{
id
:
'
coin_balance_history
'
,
title
:
'
Coin balance history
'
,
count
:
addressTabsCountersQuery
.
data
?.
coin_balances_count
,
component
:
<
AddressCoinBalance
/>,
},
config
.
chain
.
verificationType
===
'
validation
'
&&
addressTabsCountersQuery
.
data
?.
validations_count
?
...
...
ui/shared/Tabs/TabCounter.tsx
View file @
c1867134
...
...
@@ -5,15 +5,15 @@ import React from 'react';
const
COUNTER_OVERLOAD
=
50
;
type
Props
=
{
count
?:
number
;
count
?:
number
|
null
;
parentClassName
:
string
;
}
const
Ta
s
Counter
=
({
count
,
parentClassName
}:
Props
)
=>
{
const
Ta
b
Counter
=
({
count
,
parentClassName
}:
Props
)
=>
{
const
zeroCountColor
=
useColorModeValue
(
'
blackAlpha.400
'
,
'
whiteAlpha.400
'
);
if
(
count
===
undefined
)
{
if
(
count
===
undefined
||
count
===
null
)
{
return
null
;
}
...
...
@@ -35,4 +35,4 @@ const TasCounter = ({ count, parentClassName }: Props) => {
);
};
export
default
Ta
s
Counter
;
export
default
Ta
b
Counter
;
ui/shared/Tabs/types.ts
View file @
c1867134
...
...
@@ -3,7 +3,7 @@ import type React from 'react';
export
interface
TabItem
{
id
:
string
;
title
:
string
|
(()
=>
React
.
ReactNode
);
count
?:
number
;
count
?:
number
|
null
;
component
:
React
.
ReactNode
;
}
...
...
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