mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
fix some problems created when i was fixing other problems
This commit is contained in:
parent
0979bbf70f
commit
543b9e948e
|
@ -8,21 +8,23 @@ export default function Notification({
|
|||
}: {
|
||||
notification: INotification;
|
||||
}) {
|
||||
const carpoolId = notification.carpool.id;
|
||||
|
||||
const acceptReq = useCallback(() => {
|
||||
acceptRequest(notification.user.id);
|
||||
}, [notification.user.id]);
|
||||
acceptRequest(carpoolId, notification.user.id);
|
||||
}, [carpoolId, notification.user.id]);
|
||||
|
||||
const rejectReq = useCallback(() => {
|
||||
denyRequest(notification.user.id);
|
||||
}, [notification.user.id]);
|
||||
denyRequest(carpoolId, notification.user.id);
|
||||
}, [carpoolId, notification.user.id]);
|
||||
|
||||
const acceptInv = useCallback(() => {
|
||||
acceptInvite(notification.user.id);
|
||||
}, [notification.user.id]);
|
||||
acceptInvite(carpoolId, notification.user.id);
|
||||
}, [carpoolId, notification.user.id]);
|
||||
|
||||
const rejectInv = useCallback(() => {
|
||||
denyInvite(notification.user.id);
|
||||
}, [notification.user.id]);
|
||||
denyInvite(carpoolId, notification.user.id);
|
||||
}, [carpoolId, notification.user.id]);
|
||||
|
||||
return (
|
||||
<div className="notification">
|
||||
|
|
Loading…
Reference in New Issue
Block a user