автозакрытие модалки при загрузке видео
This commit is contained in:
parent
62a9237925
commit
de8f66a837
@ -94,6 +94,7 @@ export default function UploadVideoModal({ open, onClose, video, onUpload }: Hel
|
|||||||
onChange={({ target }) => {
|
onChange={({ target }) => {
|
||||||
if (target.files?.length) {
|
if (target.files?.length) {
|
||||||
onUpload(URL.createObjectURL(target.files[0] || " "));
|
onUpload(URL.createObjectURL(target.files[0] || " "));
|
||||||
|
onClose()
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
hidden
|
hidden
|
||||||
|
@ -85,7 +85,7 @@ export const MediaSelectionAndDisplay: FC<Iprops> = ({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setBackgroundUploading(false);
|
setTimeout(() => {setBackgroundUploading(false)},7000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -155,7 +155,11 @@ export const MediaSelectionAndDisplay: FC<Iprops> = ({
|
|||||||
<UploadVideoModal
|
<UploadVideoModal
|
||||||
open={isVideoUploadDialogOpen}
|
open={isVideoUploadDialogOpen}
|
||||||
onClose={() => setIsVideoUploadDialogOpen(false)}
|
onClose={() => setIsVideoUploadDialogOpen(false)}
|
||||||
onUpload={handleVideoUpload}
|
onUpload={(s:string) => {
|
||||||
|
handleVideoUpload(s);
|
||||||
|
setTimeout(() => {setBackgroundUploading(false)},5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
video={question.content.video}
|
video={question.content.video}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user