mirror of
https://github.com/prometheus/prometheus
synced 2026-04-30 23:11:34 +08:00
Merge pull request #16044 from amanycodes/fix/stable-cardUI-key
mantine-ui: stable AND definitely unique key for /alerts cards
This commit is contained in:
@@ -216,12 +216,12 @@ export default function AlertsPage() {
|
||||
// convenient to have in the same file IMO).
|
||||
const renderedPageItems = useMemo(
|
||||
() =>
|
||||
currentPageGroups.map((g, i) => (
|
||||
currentPageGroups.map((g) => (
|
||||
<Card
|
||||
shadow="xs"
|
||||
withBorder
|
||||
p="md"
|
||||
key={i} // TODO: Find a stable and definitely unique key.
|
||||
key={`${g.file}-${g.name}`}
|
||||
>
|
||||
<Group mb="sm" justify="space-between">
|
||||
<Group align="baseline">
|
||||
|
||||
@@ -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}`}
|
||||
>
|
||||
<Group mb="sm" justify="space-between">
|
||||
<Group align="baseline">
|
||||
|
||||
Reference in New Issue
Block a user