import React from 'react'; interface CustomMediaInfoPanelProps { name: string; size: number; type: string; dateModified: number; description?: string | null; } const CustomMediaInfoPanel: React.FC = ({ name, size, type, dateModified, description, }) => { function formatLocalDate(timestamp: number | undefined | null) { if (!timestamp || isNaN(timestamp)) return '-'; const date = new Date(timestamp * 1000); return date.toLocaleString('de-DE'); } return (

Datei-Eigenschaften

Name: {name || '-'}
Typ: {type || '-'}
Größe: {typeof size === 'number' && !isNaN(size) ? size + ' Bytes' : '-'}
Geändert: {formatLocalDate(dateModified)}
Beschreibung:{' '} {description && description !== 'null' ? ( description ) : ( Keine Beschreibung )}
); }; export default CustomMediaInfoPanel;