diff --git a/client/src/features/visualizer-threejs/VisualizerInstance.tsx b/client/src/features/visualizer-threejs/VisualizerInstance.tsx index a73ad6fd5..428492e43 100644 --- a/client/src/features/visualizer-threejs/VisualizerInstance.tsx +++ b/client/src/features/visualizer-threejs/VisualizerInstance.tsx @@ -33,7 +33,7 @@ import CameraControls from "./CameraControls"; import "./Visualizer.scss"; const features = { - statsEnabled: true, + statsEnabled: false, cameraControls: true, }; @@ -244,7 +244,6 @@ const VisualizerInstance: React.FC> = return ( { +export const KeyPanel = ({ network }: { network: string }) => { const statuses: { label: string; state: BlockState; @@ -59,7 +59,7 @@ export const KeyPanel = ({ bps }: { bps: number }) => { ); })} - + ); }; diff --git a/client/src/features/visualizer-threejs/wrapper/StatsPanel.tsx b/client/src/features/visualizer-threejs/wrapper/StatsPanel.tsx index 786b0533c..74c920e74 100644 --- a/client/src/features/visualizer-threejs/wrapper/StatsPanel.tsx +++ b/client/src/features/visualizer-threejs/wrapper/StatsPanel.tsx @@ -1,12 +1,14 @@ import React from "react"; +import { useNetworkStats } from "~helpers/stardust/hooks/useNetworkStats"; -export const StatsPanel = ({ bps }: { bps: number }) => { +export const StatsPanel = ({ network }: { network: string }) => { + const [blocksPerSecond] = useNetworkStats(network); return (
BPS
-
{parseInt(String(bps))}
+
{blocksPerSecond}
diff --git a/client/src/features/visualizer-threejs/wrapper/Wrapper.tsx b/client/src/features/visualizer-threejs/wrapper/Wrapper.tsx index bb8fe24f8..48370e5b8 100644 --- a/client/src/features/visualizer-threejs/wrapper/Wrapper.tsx +++ b/client/src/features/visualizer-threejs/wrapper/Wrapper.tsx @@ -8,20 +8,18 @@ import { SelectedFeedInfo } from "./SelectedFeedInfo"; export const Wrapper = ({ blocksCount, - bps, children, filter, - isEdgeRenderingEnabled, isPlaying, network, networkConfig, onChangeFilter, selectNode, selectedFeedItem, - setEdgeRenderingEnabled, setIsPlaying, + isEdgeRenderingEnabled, + setEdgeRenderingEnabled, }: { - readonly bps: number; readonly blocksCount: number; readonly children: React.ReactNode; readonly filter: string; @@ -71,7 +69,7 @@ export const Wrapper = ({ {selectedFeedItem && } - + );