add renderer components

This commit is contained in:
hamid zarghami
2025-07-01 14:36:27 +03:30
parent 2babdb1897
commit 7638e07e39
13 changed files with 1102 additions and 192 deletions
+9 -1
View File
@@ -12,7 +12,8 @@ type Props = {
preview?: string[],
onChangePreview?: (preview: string[]) => void,
getCover?: (url: string) => void,
coverUrl?: string
coverUrl?: string,
isReset?: boolean
}
const UploadBoxDraggble: FC<Props> = (props: Props) => {
@@ -67,6 +68,13 @@ const UploadBoxDraggble: FC<Props> = (props: Props) => {
setCover(props.coverUrl ? props.coverUrl : '')
}, [props.coverUrl])
useEffect(() => {
if (props.isReset) {
setFiles([])
setPerviews([])
}
}, [props.isReset])
return (
<div>