diff --git a/src/components/Groups.tsx b/src/components/Groups.tsx index e2d3455..3b4bee6 100644 --- a/src/components/Groups.tsx +++ b/src/components/Groups.tsx @@ -1,5 +1,5 @@ -import { useState, useEffect } from 'react'; -import { getGroups, getNotifications } from './api'; +import { useEffect, useState } from 'react'; +import { getGroups } from './api'; import { IGroup } from './Group'; import GroupCreatorLink from './GroupCreatorLink'; import GroupJoinerLink from './GroupJoinerLink'; @@ -7,6 +7,7 @@ import GroupList from './GroupList'; export default function Groups() { const [groups, setGroups] = useState([]); + // eslint-disable-next-line useEffect(() => { getGroups().then(setGroups); }, []); diff --git a/src/components/Notification.tsx b/src/components/Notification.tsx index 558ca63..8ea8706 100644 --- a/src/components/Notification.tsx +++ b/src/components/Notification.tsx @@ -22,7 +22,7 @@ export default function Notification({ const rejectInv = useCallback(() => { denyInvite(notification.user.id); - }, []); + }, [notification.user.id]); return (
diff --git a/src/components/Notifications.tsx b/src/components/Notifications.tsx index be98466..78a863f 100644 --- a/src/components/Notifications.tsx +++ b/src/components/Notifications.tsx @@ -1,4 +1,3 @@ -import { userInfo } from 'node:os'; import Notification from './Notification'; export type INotification = {