Skip to content

Commit

Permalink
fix deploy and minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
UdaySagar-Git committed Jul 12, 2024
1 parent 6a472cb commit 266b494
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/Components/Common/RichTextEditor/AudioRecorder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const AudioRecorder = ({
modalOpenForAudio,
setModalOpenForAudio,
}: {
setFile: React.Dispatch<React.SetStateAction<File | null>>;
setFile: (file: File) => void;
modalOpenForAudio: boolean;
setModalOpenForAudio: React.Dispatch<React.SetStateAction<boolean>>;
}) => {
Expand All @@ -23,7 +23,7 @@ const AudioRecorder = ({
type: audioBlob.type,
});
setFile(f);
audioBlobExists && setAudioBlobExists(false);
deleteAudioBlob();
};

useEffect(() => {
Expand Down Expand Up @@ -84,7 +84,6 @@ const AudioRecorder = ({
setAudioBlobExists(false);
setAudioResetRecording(true);
setModalOpenForAudio(false);
setFile(null);
};

return (
Expand Down
3 changes: 2 additions & 1 deletion src/Components/Common/RichTextEditor/CameraCaptureModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CameraCaptureModal = ({
}: {
open: boolean;
onClose: () => void;
setFile: React.Dispatch<React.SetStateAction<File | null>>;
setFile: (file: File) => void;
}) => {
const [previewImage, setPreviewImage] = useState<string | null>(null);
const webRef = useRef<Webcam>(null);
Expand Down Expand Up @@ -51,6 +51,7 @@ const CameraCaptureModal = ({
};

const onUpload = () => {
if (!capture) return;
setFile(capture);
onClose();
};
Expand Down
3 changes: 2 additions & 1 deletion src/Components/Common/RichTextEditor/RichTextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { CreateFileResponse } from "../../Patient/models";
interface RichTextEditorProps {
initialMarkdown?: string;
onChange: (markdown: string) => void;
onAddNote: () => void;
onAddNote: () => Promise<string | undefined>;
isAuthorized?: boolean;
}

Expand Down Expand Up @@ -819,6 +819,7 @@ const RichTextEditor: React.FC<RichTextEditorProps> = ({
id="add_doctor_note_button"
onClick={async () => {
const id = await onAddNote();
if (!id) return;
for (const file of tempFiles) {
await handleFileUpload(file, id);
}
Expand Down

0 comments on commit 266b494

Please sign in to comment.