From 6ec3a8c451776190bddcdfd85d1f7e27ad002991 Mon Sep 17 00:00:00 2001 From: Ashesh3 <3626859+Ashesh3@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:17:54 +0530 Subject: [PATCH] Reset preview image and close modal for camera --- src/Components/Patient/FileUpload.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Components/Patient/FileUpload.tsx b/src/Components/Patient/FileUpload.tsx index e1ea368af72..d1dedc5e2ff 100644 --- a/src/Components/Patient/FileUpload.tsx +++ b/src/Components/Patient/FileUpload.tsx @@ -276,6 +276,7 @@ export const FileUpload = (props: FileUploadProps) => { const handleClose = () => { setDownloadURL(""); + setPreviewImage(null); setFileState({ ...file_state, open: false, @@ -1212,6 +1213,7 @@ export const FileUpload = (props: FileUploadProps) => { { + setPreviewImage(null); setModalOpenForCamera(false); }} className="m-2" @@ -1272,6 +1274,7 @@ export const FileUpload = (props: FileUploadProps) => { { setModalOpenForCamera(false); + setPreviewImage(null); }} > {t("submit")}