Automatic dismiss of upload popup
This commit is contained in:
@@ -75,13 +75,15 @@ const SignDetailpage: React.FC<Props> = (props) => {
|
|||||||
const handleUpload = async () => {
|
const handleUpload = async () => {
|
||||||
setUploadProgress(0);
|
setUploadProgress(0);
|
||||||
uploadSignVideo(sign!.id, recordedBlob!, handleUploadProgress).then((response) => {
|
uploadSignVideo(sign!.id, recordedBlob!, handleUploadProgress).then((response) => {
|
||||||
setUploadProgress(100);
|
|
||||||
|
setPopUpShown(false);
|
||||||
|
|
||||||
// add the new sign video to the sign
|
// add the new sign video to the sign
|
||||||
console.log(response)
|
|
||||||
const newSign = { ...sign! };
|
const newSign = { ...sign! };
|
||||||
|
|
||||||
newSign.sign_videos.push(response);
|
newSign.sign_videos.push(response);
|
||||||
setSign(newSign);
|
setSign(newSign);
|
||||||
|
setUploadProgress(100);
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
setUploadProgress(null);
|
setUploadProgress(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user