import { useEffect, useState } from "react"; export default function FilesPanel() { const [files, setFiles] = useState([]); useEffect(() => { fetch("/api/list-files") .then((r) => r.json()) .then((j) => setFiles(j.files)) .catch(() => setFiles([])); }, []); return (

Arquivos

); }