import { PhotoIcon } from '@heroicons/react/24/outline'; import { ChangeEvent, useId, useState } from 'react'; type FileInputProps = { name: string; label: string; }; const FileInput = ({ name, label }: FileInputProps) => { const id = useId(); const [file, setFile] = useState(); const onFileChange = (e: ChangeEvent) => { if (e.target.files && e.target.files.length > 0) { setFile(e.target.files[0]); } }; return (
{file &&

{file.name}

}
); }; export default FileInput;