import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { MyNotificationsProps } from '../../../model/components/profile'; import Notifications from '../../icons/Notifications'; // import CheckBig from '../../icons/CheckBig'; import { Notification } from '../../../model/user'; // import CloseSmall from '../../icons/CloseSmall'; // import IconButton from '../../common/IconButton'; const MyNotifications: React.FC = ({ notifications: userNotifications, // team, }) => { const { t } = useTranslation(); // const [notifications, setNotifications] = const [notifications] = useState(userNotifications); // const acceptUser: (dateIndex: number, infoIndex: number) => void = ( // dateIndex, // infoIndex, // ) => { // const updatedNotifications = notifications; // updatedNotifications[dateIndex].notificationsInfo[infoIndex].accepted = // true; // setNotifications(updatedNotifications); // }; return (

{t('NOTIFICATIONS')}

{notifications?.length ? (
    {/* {notifications.map((currentDate, dateIndex) => ( */} {notifications.map((currentDate) => (
  • {currentDate.date}

  • {/* {currentDate.notificationsInfo.map((currentInfo, infoIndex) => ( */} {currentDate.notificationsInfo.map((currentInfo) => (
  • {/* {currentInfo.requestedTeam?.id === team.id && ( )} */}

    {t(currentInfo.text, { userName: currentInfo.newUser?.username, })}

    {/* */}
  • ))}
    ))}
) : (

{t('NO_NOTIFICATIONS')}

)}
); }; export default MyNotifications;