fix some warnings

This commit is contained in:
Michael Fatemi 2021-07-06 22:46:08 -04:00
parent efa076e6d5
commit 51a11f95af
3 changed files with 7 additions and 8 deletions

View File

@ -1,13 +1,12 @@
import { useState, useEffect } from 'react';
import { getGroups, getNotifications } from './api';
import { useEffect, useState } from 'react';
import { getGroups } from './api';
import { IGroup } from './Group';
import { INotification } from './Notifications';
import GroupCreatorLink from './GroupCreatorLink';
import GroupJoinerLink from './GroupJoinerLink';
import GroupList from './GroupList';
import Notifications from './Notifications';
import Notifications, { INotification } from './Notifications';
const dummyNotificationData: INotification[] = ([] = [
const dummyNotificationData: INotification[] = [
{
user: {
id: 0,
@ -32,10 +31,11 @@ const dummyNotificationData: INotification[] = ([] = [
isRequest: false,
sentTime: new Date(),
},
]);
];
export default function Groups() {
const [groups, setGroups] = useState<IGroup[]>([]);
// eslint-disable-next-line
const [notifications, setNotifications] = useState(dummyNotificationData);
useEffect(() => {
getGroups().then(setGroups);

View File

@ -22,7 +22,7 @@ export default function Notification({
const rejectInv = useCallback(() => {
denyInvite(notification.user.id);
}, []);
}, [notification.user.id]);
return (
<div className="notification">

View File

@ -1,4 +1,3 @@
import { userInfo } from 'node:os';
import Notification from './Notification';
export type INotification = {