diff --git a/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx b/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx index cc8da4096..20470818d 100644 --- a/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx +++ b/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx @@ -117,8 +117,6 @@ const ListView: React.FC = ({ if (disableSelection) { const path = withSiteId(`/metrics/${metric.metricId}`, siteId); history.push(path); - } else { - toggleSelection?.(metric.metricId); } }; diff --git a/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx b/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx index f807f1a70..5c197336b 100644 --- a/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx +++ b/frontend/app/components/Dashboard/components/MetricsList/MetricsList.tsx @@ -50,6 +50,7 @@ function MetricsList({ }, [selectedMetrics, onSelectionChange]); const toggleMetricSelection = (id: any) => { + console.log(id) if (Array.isArray(id)) { setSelectedMetrics(id); return; diff --git a/frontend/app/mstore/dashboardStore.ts b/frontend/app/mstore/dashboardStore.ts index 21fc3de7e..165c88484 100644 --- a/frontend/app/mstore/dashboardStore.ts +++ b/frontend/app/mstore/dashboardStore.ts @@ -467,7 +467,7 @@ export default class DashboardStore { this.isSaving = true; try { try { - const response = await dashboardService.addWidget(dashboard, metricIds); + await dashboardService.addWidget(dashboard, metricIds); toast.success('Card added to dashboard.'); } catch { toast.error('Card could not be added.');