dashboard: lazy load charts on overview

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-26 22:14:18 +01:00
parent 44c66dbed4
commit 64701bf29f
7 changed files with 23 additions and 16 deletions

View File

@@ -7,6 +7,7 @@ import { cn } from '@/utils/cn';
import type { IChartType } from '@openpanel/validation';
import { LazyChart } from '../report/chart/LazyChart';
import { Widget, WidgetBody } from '../widget';
import { OverviewChartToggle } from './overview-chart-toggle';
import { WidgetButtons, WidgetHead } from './overview-widget';
@@ -136,7 +137,7 @@ export default function OverviewTopGeo({ projectId }: OverviewTopGeoProps) {
</WidgetButtons>
</WidgetHead>
<WidgetBody>
<ChartSwitch
<LazyChart
hideID
{...widget.chart}
previous={false}