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 dc1b95b74e
commit c7d98efd29
2 changed files with 3 additions and 3 deletions

View file

@ -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.
>
<Group mb="md" mt="xs" ml="xs" justify="space-between">
<Group align="baseline">

View file

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