From c7d98efd29bebbd017323d363116d3d3f58f3157 Mon Sep 17 00:00:00 2001 From: amanycodes Date: Wed, 19 Feb 2025 15:26:19 +0530 Subject: [PATCH] stable and unique key for /rules page and key fixes Signed-off-by: amanycodes --- web/ui/mantine-ui/src/pages/AlertsPage.tsx | 2 +- web/ui/mantine-ui/src/pages/RulesPage.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/ui/mantine-ui/src/pages/AlertsPage.tsx b/web/ui/mantine-ui/src/pages/AlertsPage.tsx index d6402199e9..e180bfccd6 100644 --- a/web/ui/mantine-ui/src/pages/AlertsPage.tsx +++ b/web/ui/mantine-ui/src/pages/AlertsPage.tsx @@ -220,7 +220,7 @@ export default function AlertsPage() { shadow="xs" withBorder p="md" - key={`${g.name}-${g.file}`} // TODO: Find a stable and definitely unique key. + key={`${g.file}-${g.name}`} // TODO: Find a stable and definitely unique key. > diff --git a/web/ui/mantine-ui/src/pages/RulesPage.tsx b/web/ui/mantine-ui/src/pages/RulesPage.tsx index 0888fe4737..fff95f0900 100644 --- a/web/ui/mantine-ui/src/pages/RulesPage.tsx +++ b/web/ui/mantine-ui/src/pages/RulesPage.tsx @@ -86,13 +86,13 @@ export default function RulesPage() { (effectiveActivePage - 1) * ruleGroupsPerPage, effectiveActivePage * ruleGroupsPerPage ) - .map((g, i) => ( + .map((g) => (