Commit c1867134 authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

update tabs counters type (#1284)

Co-authored-by: default avatarisstuev <natix.naf@gmail.com>
parent 1b4fb34e
...@@ -43,7 +43,6 @@ export const ADDRESS_COUNTERS: AddressCounters = { ...@@ -43,7 +43,6 @@ export const ADDRESS_COUNTERS: AddressCounters = {
}; };
export const ADDRESS_TABS_COUNTERS: AddressTabsCounters = { export const ADDRESS_TABS_COUNTERS: AddressTabsCounters = {
coin_balances_count: 10,
internal_txs_count: 10, internal_txs_count: 10,
logs_count: 10, logs_count: 10,
token_balances_count: 10, token_balances_count: 10,
......
...@@ -152,12 +152,11 @@ export type AddressWithdrawalsItem = { ...@@ -152,12 +152,11 @@ export type AddressWithdrawalsItem = {
} }
export type AddressTabsCounters = { export type AddressTabsCounters = {
coin_balances_count: number; internal_txs_count: number | null;
internal_txs_count: number; logs_count: number | null;
logs_count: number; token_balances_count: number | null;
token_balances_count: number; token_transfers_count: number | null;
token_transfers_count: number; transactions_count: number | null;
transactions_count: number; validations_count: number | null;
validations_count: number; withdrawals_count: number | null;
withdrawals_count: number;
} }
...@@ -105,7 +105,6 @@ const AddressPageContent = () => { ...@@ -105,7 +105,6 @@ const AddressPageContent = () => {
{ {
id: 'coin_balance_history', id: 'coin_balance_history',
title: 'Coin balance history', title: 'Coin balance history',
count: addressTabsCountersQuery.data?.coin_balances_count,
component: <AddressCoinBalance/>, component: <AddressCoinBalance/>,
}, },
config.chain.verificationType === 'validation' && addressTabsCountersQuery.data?.validations_count ? config.chain.verificationType === 'validation' && addressTabsCountersQuery.data?.validations_count ?
......
...@@ -5,15 +5,15 @@ import React from 'react'; ...@@ -5,15 +5,15 @@ import React from 'react';
const COUNTER_OVERLOAD = 50; const COUNTER_OVERLOAD = 50;
type Props = { type Props = {
count?: number; count?: number | null;
parentClassName: string; parentClassName: string;
} }
const TasCounter = ({ count, parentClassName }: Props) => { const TabCounter = ({ count, parentClassName }: Props) => {
const zeroCountColor = useColorModeValue('blackAlpha.400', 'whiteAlpha.400'); const zeroCountColor = useColorModeValue('blackAlpha.400', 'whiteAlpha.400');
if (count === undefined) { if (count === undefined || count === null) {
return null; return null;
} }
...@@ -35,4 +35,4 @@ const TasCounter = ({ count, parentClassName }: Props) => { ...@@ -35,4 +35,4 @@ const TasCounter = ({ count, parentClassName }: Props) => {
); );
}; };
export default TasCounter; export default TabCounter;
...@@ -3,7 +3,7 @@ import type React from 'react'; ...@@ -3,7 +3,7 @@ import type React from 'react';
export interface TabItem { export interface TabItem {
id: string; id: string;
title: string | (() => React.ReactNode); title: string | (() => React.ReactNode);
count?: number; count?: number | null;
component: React.ReactNode; component: React.ReactNode;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment