diff --git a/apps/web/src/components/ui/charts/BusterChartComponent.tsx b/apps/web/src/components/ui/charts/BusterChartComponent.tsx index 27bda41c2..8dec3ef90 100644 --- a/apps/web/src/components/ui/charts/BusterChartComponent.tsx +++ b/apps/web/src/components/ui/charts/BusterChartComponent.tsx @@ -1,5 +1,6 @@ +'use client'; + import type React from 'react'; -import { useMemo } from 'react'; import { BusterChartJS } from './BusterChartJS'; import { useDatasetOptions } from './chartHooks'; import type { @@ -46,32 +47,18 @@ export const BusterChartComponent: React.FC = ( columnMetadata }); - // biome-ignore lint/correctness/useExhaustiveDependencies: we are content with the current dependencies - const chartProps: BusterChartComponentProps = useMemo( - () => ({ - ...props, - datasetOptions, - pieMinimumSlicePercentage, - y2AxisKeys, - yAxisKeys, - tooltipKeys, - hasMismatchedTooltipsAndMeasures, - isDownsampled, - numberOfDataPoints, - trendlines - }), - [ - props.selectedAxis, - pieMinimumSlicePercentage, - datasetOptions, - y2AxisKeys, - yAxisKeys, - hasMismatchedTooltipsAndMeasures, - tooltipKeys, - isDownsampled, - numberOfDataPoints - ] - ); + const chartProps: BusterChartComponentProps = { + ...props, + datasetOptions, + pieMinimumSlicePercentage, + y2AxisKeys, + yAxisKeys, + tooltipKeys, + hasMismatchedTooltipsAndMeasures, + isDownsampled, + numberOfDataPoints, + trendlines + }; return ; }; diff --git a/apps/web/src/components/ui/charts/BusterChartDynamic.tsx b/apps/web/src/components/ui/charts/BusterChartDynamic.tsx index a9b396477..10b39e229 100644 --- a/apps/web/src/components/ui/charts/BusterChartDynamic.tsx +++ b/apps/web/src/components/ui/charts/BusterChartDynamic.tsx @@ -1,3 +1,5 @@ +'use client'; + import dynamic from 'next/dynamic'; import { PreparingYourRequestLoader } from './LoadingComponents/ChartLoadingComponents'; diff --git a/apps/web/src/controllers/MetricController/MetricViewChart/MetricViewChartContent.tsx b/apps/web/src/controllers/MetricController/MetricViewChart/MetricViewChartContent.tsx index 766cfb32e..b29316574 100644 --- a/apps/web/src/controllers/MetricController/MetricViewChart/MetricViewChartContent.tsx +++ b/apps/web/src/controllers/MetricController/MetricViewChart/MetricViewChartContent.tsx @@ -1,4 +1,6 @@ -import React, { useMemo } from 'react'; +'use client'; + +import React from 'react'; import type { BusterMetricData, BusterMetric } from '@/api/asset_interfaces/metric'; import type { DataMetadata } from '@buster/server-shared/metrics'; import { BusterChartDynamic } from '@/components/ui/charts/BusterChartDynamic';