fix: AuditLogPage – React-key am Listen-Fragment (Konsolen-Warnung)
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user