import { Authorization } from '@/constants/authorization'; import { getAuthorization } from '@/utils/authorization-util'; import { PlusOutlined } from '@ant-design/icons'; import type { UploadFile, UploadProps } from 'antd'; import { Image, Input, Upload } from 'antd'; import { useState } from 'react'; const InputWithUpload = () => { const [previewOpen, setPreviewOpen] = useState(false); const [previewImage, setPreviewImage] = useState(''); const [fileList, setFileList] = useState([]); const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => setFileList(newFileList); const uploadButton = ( ); return ( <> {fileList.length >= 8 ? null : uploadButton} {previewImage && ( setPreviewOpen(visible), afterOpenChange: (visible) => !visible && setPreviewImage(''), }} src={previewImage} /> )} ); }; export default () => { return (
); };