stable and unique key for /rules page and key fixes

Signed-off-by: amanycodes <amanycodes@gmail.com>
This commit is contained in:
amanycodes 2025-02-19 15:26:19 +05:30
parent de5b5c56e2
commit 25d2746e35
2 changed files with 4 additions and 3 deletions

View File

@ -221,7 +221,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.
>
<Group mb="sm" justify="space-between">
<Group align="baseline">

View File

@ -86,12 +86,13 @@ export default function RulesPage() {
(effectiveActivePage - 1) * ruleGroupsPerPage,
effectiveActivePage * ruleGroupsPerPage
)
.map((g, i) => (
.map((g) => (
<Card
shadow="xs"
withBorder
p="md"
key={i} // TODO: Find a stable and definitely unique key.
mb="md"
key={`${g.file}-${g.name}`} // TODO: Find a stable and definitely unique key.
>
<Group mb="sm" justify="space-between">
<Group align="baseline">