mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-05 21:57:09 +02: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:
commit
9ab60c59e4
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user