Skip to content

Commit

Permalink
lint errors solved
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanptm committed Oct 10, 2024
1 parent e0df0e7 commit e94c985
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/components/button/DownloadPrescriptionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const DownloadPrescriptionButton = ({ prescription, doctor, patient }: Props) =>
} catch (error) {
console.error('Error generating PDF:', error);
}
}, []);
}, [prescription, doctor, patient]);

return (
<ButtonV2 variant="shine" onClick={handleDownload}>
Expand Down
6 changes: 3 additions & 3 deletions client/components/button/NotificationButtonDoctor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ const NotificationButtonDoctor = forwardRef<HTMLButtonElement>((props, ref) => {

const handleNotificationClick = useCallback(() => {
setIsNotificationModalOpen(true);
}, [isNotificationModalOpen]);
}, []);

const handleClearSingleNotification = useCallback((notificationId: string) => {
clearNotification(notificationId);
}, [notifications]);
}, [notifications, clearNotification]);

const handleClearAllNotifications = useCallback(() => {
if (!notifications || notifications.length === 0) return;

const notificationIds = notifications.map((notification) => notification._id!);
clearAllNotifications(notificationIds);
},[notifications]);
}, [notifications,clearAllNotifications]);

return (
<>
Expand Down
6 changes: 3 additions & 3 deletions client/components/button/NotificationButtonPatient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ const NotificationButtonPatient = () => {

const handleNotificationClick = useCallback(() => {
setIsNotificationModalOpen(true);
},[isNotificationModalOpen]);
},[]);

const handleClearSingleNotification = useCallback((notificationId: string) => {
clearNotification(notificationId);
},[notifications]);
},[notifications, clearAllNotifications]);

const handleClearAllNotifications = useCallback(() => {
if (!notifications || notifications.length === 0) return;
const notificationsIds = notifications.map(el => el._id!);
clearAllNotifications(notificationsIds);
},[notifications]);
},[notifications, clearAllNotifications]);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion client/components/page-components/chatbot/ChatSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const ChatSection = ({ isVisible, setIsOpen, isAuthenticated }: Props) => {
}
);
}
}, [inputMessage, setInputMessage, setIsTyping, getRandomId]);
}, [inputMessage, setInputMessage, setIsTyping, createMessage]);

return (
<AnimatePresence onExitComplete={() => setIsOpen(false)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ export const AyurvedaSection = memo(() => (
</div>
</div>
));

AyurvedaSection.displayName = "AyurvedaSection";
2 changes: 1 addition & 1 deletion server/src/config/connectDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MONGODB_URL } from "./env";

export const connectDB = async () => {
try {
await connect(`${MONGODB_URL}/AVM`);
await connect(`${MONGODB_URL}`);
} catch (error) {
console.log("Error in Connecting MongoDB ", error);
}
Expand Down

0 comments on commit e94c985

Please sign in to comment.