mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
fix some warnings
This commit is contained in:
parent
efa076e6d5
commit
51a11f95af
|
@ -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);
|
||||
|
|
|
@ -22,7 +22,7 @@ export default function Notification({
|
|||
|
||||
const rejectInv = useCallback(() => {
|
||||
denyInvite(notification.user.id);
|
||||
}, []);
|
||||
}, [notification.user.id]);
|
||||
|
||||
return (
|
||||
<div className="notification">
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { userInfo } from 'node:os';
|
||||
import Notification from './Notification';
|
||||
|
||||
export type INotification = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user