import Link from 'next/link'; import { useRouter } from 'next/navigation'; import styles from './dmsComponents.module.css'; interface FileRowProps { file: { id: number | string; name: string; type: string; size: string; date: string; tags?: string[]; }; onDelete?: (id: number | string) => void; onShare?: (file: FileRowProps['file']) => void; } export default function FileRow({ file, onDelete, onShare }: FileRowProps) { const router = useRouter(); return (
{file.type === 'PDF' ? '📄' : file.type === 'IMG' ? '🖼️' : '📁'} {file.name}
{file.tags && file.tags.length > 0 ? (
{file.tags.map((tag, i) => ( {tag} ))}
) : ( - )} {file.size} {file.date}
); }