From e41ea74d6d2114cccb50e20a2029db06f7320a8e Mon Sep 17 00:00:00 2001 From: Victor Mylle Date: Wed, 1 Mar 2023 12:27:28 +0100 Subject: [PATCH] Automatic dismiss of upload popup --- frontend/src/components/SignDetailPage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/SignDetailPage.tsx b/frontend/src/components/SignDetailPage.tsx index 31c8718..43b9175 100644 --- a/frontend/src/components/SignDetailPage.tsx +++ b/frontend/src/components/SignDetailPage.tsx @@ -75,13 +75,15 @@ const SignDetailpage: React.FC = (props) => { const handleUpload = async () => { setUploadProgress(0); uploadSignVideo(sign!.id, recordedBlob!, handleUploadProgress).then((response) => { - setUploadProgress(100); + + setPopUpShown(false); + // add the new sign video to the sign - console.log(response) const newSign = { ...sign! }; newSign.sign_videos.push(response); setSign(newSign); + setUploadProgress(100); }).catch((error) => { setUploadProgress(null); }