mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-07 06:37:17 +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).
|
// convenient to have in the same file IMO).
|
||||||
const renderedPageItems = useMemo(
|
const renderedPageItems = useMemo(
|
||||||
() =>
|
() =>
|
||||||
currentPageGroups.map((g, i) => (
|
currentPageGroups.map((g) => (
|
||||||
<Card
|
<Card
|
||||||
shadow="xs"
|
shadow="xs"
|
||||||
withBorder
|
withBorder
|
||||||
p="md"
|
p="md"
|
||||||
key={i} // TODO: Find a stable and definitely unique key.
|
key={`${g.file}-${g.name}`}
|
||||||
>
|
>
|
||||||
<Group mb="sm" justify="space-between">
|
<Group mb="sm" justify="space-between">
|
||||||
<Group align="baseline">
|
<Group align="baseline">
|
||||||
|
@ -86,12 +86,13 @@ export default function RulesPage() {
|
|||||||
(effectiveActivePage - 1) * ruleGroupsPerPage,
|
(effectiveActivePage - 1) * ruleGroupsPerPage,
|
||||||
effectiveActivePage * ruleGroupsPerPage
|
effectiveActivePage * ruleGroupsPerPage
|
||||||
)
|
)
|
||||||
.map((g, i) => (
|
.map((g) => (
|
||||||
<Card
|
<Card
|
||||||
shadow="xs"
|
shadow="xs"
|
||||||
withBorder
|
withBorder
|
||||||
p="md"
|
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 mb="sm" justify="space-between">
|
||||||
<Group align="baseline">
|
<Group align="baseline">
|
||||||
|
Loading…
Reference in New Issue
Block a user