Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved type error using custom function #10628

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/components/Common/AvatarEditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ const AvatarEditModal = ({
setSelectedFile(myFile);
});
};

const stopCamera = useCallback(() => {
const stream = webRef.current?.video?.srcObject as MediaStream;
if (stream) {
stream.getTracks().forEach((track) => track.stop());
}
setIsCameraOpen(false);
}, []);
const closeModal = () => {
setPreview(undefined);
setIsProcessing(false);
Expand Down Expand Up @@ -407,7 +413,7 @@ const AvatarEditModal = ({
onClick={() => {
setPreviewImage(null);
setIsCameraOpen(false);
webRef.current.stopCamera();
stopCamera();
}}
disabled={isProcessing}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Medicine/MedicationRequestTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function MedicationRequestTable({
<div className="space-y-2">
<div className="rounded-lg">
<Tabs defaultValue="prescriptions">
<TabsList className="bg-gray-200 py-0 w-fit ">
<TabsList className="bg-gray-200 py-0 w-fit">
<TabsTrigger
value="prescriptions"
className="data-[state=active]:bg-white rounded-md px-4 font-semibold"
Expand All @@ -131,7 +131,7 @@ export default function MedicationRequestTable({

<TabsContent value="prescriptions">
<div className="flex flex-col gap-2">
<div className="flex items-center justify-between p-2 gap-2">
<div className="flex items-center justify-between p-2 gap-2 flex-wrap">
<div className="flex items-center gap-2 flex-1">
<CareIcon icon="l-search" className="text-lg text-gray-500" />
<input
Expand Down