Skip to content

Commit

Permalink
Reset preview image and close modal for camera
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 committed Jan 12, 2024
1 parent f2bf161 commit 6ec3a8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Components/Patient/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export const FileUpload = (props: FileUploadProps) => {

const handleClose = () => {
setDownloadURL("");
setPreviewImage(null);
setFileState({
...file_state,
open: false,
Expand Down Expand Up @@ -1212,6 +1213,7 @@ export const FileUpload = (props: FileUploadProps) => {
</ButtonV2>
<Submit
onClick={() => {
setPreviewImage(null);
setModalOpenForCamera(false);
}}
className="m-2"
Expand Down Expand Up @@ -1272,6 +1274,7 @@ export const FileUpload = (props: FileUploadProps) => {
<Submit
onClick={() => {
setModalOpenForCamera(false);
setPreviewImage(null);
}}
>
{t("submit")}
Expand Down

0 comments on commit 6ec3a8c

Please sign in to comment.