From f235d72fc1079c35e78b84b7e1900a65c92d8a6d Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 6 Jun 2025 16:15:54 +0200 Subject: [PATCH] ui: fix double metric selection in list --- .../components/Dashboard/components/MetricsList/ListView.tsx | 2 -- frontend/app/mstore/dashboardStore.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) 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/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.');