diff --git a/apps/dashboard/src/components/overview/overview-chart-toggle.tsx b/apps/dashboard/src/components/overview/overview-chart-toggle.tsx index 25cc0899..66ac3463 100644 --- a/apps/dashboard/src/components/overview/overview-chart-toggle.tsx +++ b/apps/dashboard/src/components/overview/overview-chart-toggle.tsx @@ -1,10 +1,15 @@ +import type { Dispatch, SetStateAction } from 'react'; import { BarChartIcon, LineChartIcon } from 'lucide-react'; -import { Button } from '../ui/button'; -import { useOverviewOptions } from './useOverviewOptions'; +import type { IChartType } from '@openpanel/validation'; -export function OverviewChartToggle() { - const { chartType, setChartType } = useOverviewOptions(); +import { Button } from '../ui/button'; + +interface Props { + chartType: IChartType; + setChartType: Dispatch>; +} +export function OverviewChartToggle({ chartType, setChartType }: Props) { return (