Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ping chart #416

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/components/LiveTransactionStatsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ import { Bar } from 'react-chartjs-2';
import CountUp from 'react-countup';
import { RefreshCw } from 'react-feather';

import { useCluster } from '../providers/cluster';
import {
useValidatorsAppPingStats,
ValidatorsAppPingStatsInfo,
ValidatorsAppPingStatsRecord,
} from '../providers/stats/ValidatorsAppStatsProvider';
import { Cluster } from '../utils/cluster';

Chart.register(BarElement, CategoryScale, LinearScale, Tooltip);

Expand All @@ -42,18 +40,18 @@ const SERIES_INFO = {

export function LiveTransactionStatsCard() {
const [series, setSeries] = React.useState<Series>('short');
const { cluster } = useCluster();
// const { cluster } = useCluster();
return (
<div className="card">
<div className="card-header">
<h4 className="card-header-title">Live Transaction Stats</h4>
</div>
<TpsCardBody series={series} setSeries={setSeries} />
{cluster === Cluster.MainnetBeta ? (
{/* {cluster === Cluster.MainnetBeta ? (
<ValidatorsAppPingStatsCardBody series={series} setSeries={setSeries} />
) : (
<PingStatsCardBody series={series} setSeries={setSeries} />
)}
)} */}
</div>
);
}
Expand Down Expand Up @@ -380,6 +378,7 @@ function AnimatedTransactionCount({ info }: { info: PerformanceInfo }) {
);
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
function PingStatsCardBody({ series, setSeries }: { series: Series; setSeries: SetSeries }) {
const pingInfo = useSolanaPingInfo();

Expand All @@ -390,6 +389,7 @@ function PingStatsCardBody({ series, setSeries }: { series: Series; setSeries: S
return <PingBarChart pingInfo={pingInfo} series={series} setSeries={setSeries} />;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
function ValidatorsAppPingStatsCardBody({ series, setSeries }: { series: Series; setSeries: SetSeries }) {
const pingInfo = useValidatorsAppPingStats();

Expand Down
Loading