Automatic dismiss of upload popup
This commit is contained in:
@@ -75,13 +75,15 @@ const SignDetailpage: React.FC<Props> = (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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user