fix: AuditLogPage – React-key am Listen-Fragment (Konsolen-Warnung)
Security Audit / Python Dependency Audit (push) Has been cancelled
Security Audit / Node.js Dependency Audit (push) Has been cancelled

agent-06 Audit-Log war bereits vollständig implementiert (Backend-Router mit
Filtern + Dropdown-Endpunkten, AuditLogPage mit Filter/Tabelle/JSON-Diff/CSV).
Hier nur die fehlende key-Prop am map-Fragment auf React.Fragment umgestellt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 13:23:18 +02:00
co-authored by Claude Opus 4.8
parent 450dbdb64a
commit 6a34bd11d8
+4 -5
View File
@@ -1,4 +1,4 @@
import { useEffect, useState, useCallback } from 'react'
import { useEffect, useState, useCallback, Fragment } from 'react'
import { api } from '../api/client'
import { Layout } from '../components/Layout'
import { Spinner } from '../components/Spinner'
@@ -291,9 +291,8 @@ export function AuditLogPage() {
</tr>
)}
{entries.map(e => (
<>
<Fragment key={e.id}>
<tr
key={e.id}
className='hover:bg-gray-50 cursor-pointer'
onClick={() => setExpanded(expanded === e.id ? null : e.id)}
>
@@ -334,7 +333,7 @@ export function AuditLogPage() {
</tr>
{expanded === e.id && (e.old_value || e.new_value) && (
<tr key={`${e.id}-detail`} className='bg-gray-50'>
<tr className='bg-gray-50'>
<td colSpan={6} className='px-6 py-4'>
<div className='grid grid-cols-1 md:grid-cols-2 gap-4'>
<JsonBlock label='Vorher' val={e.old_value} />
@@ -343,7 +342,7 @@ export function AuditLogPage() {
</td>
</tr>
)}
</>
</Fragment>
))}
</tbody>
</table>