From 13e83fa774652fdc72bc999ce33f8108d8c17254 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 dac0e2972..2c97e3657 100644 --- a/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx +++ b/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx @@ -116,8 +116,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 c337ac75c..317700dce 100644 --- a/frontend/app/mstore/dashboardStore.ts +++ b/frontend/app/mstore/dashboardStore.ts @@ -457,7 +457,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.');