Ctfileui Review
// features/DragDropUpload.jsx import useState from "react"; export default function DragDropUpload() const [files, setFiles] = useState([]); const [dragActive, setDragActive] = useState(false);
files.length > 0 && ( <div className="mt-6"> <h3 className="font-semibold mb-2">Upload preview</h3> <ul className="space-y-2"> files.map((file, idx) => ( <li key=idx className="flex items-center justify-between bg-gray-100 p-2 rounded"> <span className="truncate">file.name</span> <span className="text-sm text-gray-500"> (file.size / 1024).toFixed(1) KB </span> </li> )) </ul> </div> ) </div> ); ctfileui
const handleDrag = (e) => e.preventDefault(); e.stopPropagation(); if (e.type === "dragenter" ; // features/DragDropUpload