diff --git a/app/stats/charts/volume-chart.tsx b/app/stats/charts/volume-chart.tsx index 7a34a24c..763fbcac 100644 --- a/app/stats/charts/volume-chart.tsx +++ b/app/stats/charts/volume-chart.tsx @@ -1,5 +1,3 @@ -"use client" - import * as React from "react" import numeral from "numeral" @@ -57,15 +55,7 @@ export function VolumeChart() { volume: dataPoint.volume, })) - // const { data: cumulativeData } = useCumulativeVolume({ - // from: now - 2 * timePeriod.day, - // to: now, - // }) - // const cumulativeVolumeLabel = React.useMemo(() => { - // if (!cumulativeData) return "" - // return formatStat(cumulativeData[cumulativeData.length - 1].volume) - // }, [cumulativeData]) - const cumulativeVolume = chartData?.[chartData.length - 1]?.volume + const cumulativeVolume = chartData?.[chartData.length - 2]?.volume const cumulativeVolumeLabel = formatStat(cumulativeVolume ?? 0) return ( @@ -73,7 +63,7 @@ export function VolumeChart() {
- {cumulativeVolumeLabel ? ( + {cumulativeVolume ? ( cumulativeVolumeLabel ) : (