dx: admin/home: solved console warning clicking check-for-updates
Massimo Melina committed
Jan 21, 2025 at 19:22 UTC
1b67d60a2597ded96cd1b4906c1da7ff42c8df15
1 file changed
+2
-2
admin/src/HomePage.ts
+2
-2
@@ -126,7 +126,7 @@ export default function HomePage() {
126
!updates.length || !status.updatePossible && !newer ? entry('', "No update available")
127
: newer && !status.updatePossible ? entry('success', `Version ${newer.name} available`)
128
: h(Flex, { vert: true },
129
- updates.map((x: any) => h(Update, { info: x })) ),
129
+ updates.map((x: any) => h(Update, { info: x, key: x.name })) ),
130
entry('', h(Link, { href: REPO_URL + 'releases/', target: 'repo' }, "All releases"))
131
)),
132
h(SwitchThemeBtn, { variant: 'outlined' }),
@@ -141,7 +141,7 @@ export default function HomePage() {
141
142
function Update({ info, title, bodyCollapsed }: { title?: ReactNode, info: Release, bodyCollapsed?: boolean }) {
143
const [collapsed, setCollapsed] = useState(bodyCollapsed)
144
- return h(Flex, { key: info.name, alignItems: 'flex-start', flexWrap: 'wrap' },
144
+ return h(Flex, { alignItems: 'flex-start', flexWrap: 'wrap' },
145
h(Card, {}, h(CardContent, {},
146
title && h(Box, { fontSize: 'larger', mb: 1 }, title),
147
h(Btn, {