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