1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00
vault-frontend/src/containers/notifications/NotificationList/index.tsx
muerwre a39d000ff2
add user notifications (#148)
* added notification settings

* notifications: added list to profile

* notifications: changed appearance for comment notifications
2023-03-11 17:16:31 +06:00

34 lines
951 B
TypeScript

import React, { FC } from 'react';
import { LoaderCircle } from '~/components/input/LoaderCircle';
import { NotificationComment } from '~/components/notifications/NotificationComment';
import { useNotificationsList } from '~/hooks/notifications/useNotificationsList';
import styles from './styles.module.scss';
interface NotificationListProps {}
const NotificationList: FC<NotificationListProps> = () => {
const { isLoading, items } = useNotificationsList();
if (isLoading) {
return <LoaderCircle />;
}
return (
<div className={styles.grid}>
{/* <div className={styles.head}>HEAD</div> */}
<div className={styles.list}>
<div className={styles.items}>
{items?.map((item) => (
<div className={styles.item} key={item.created_at}>
<NotificationComment item={item} />
</div>
))}
</div>
</div>
</div>
);
};
export { NotificationList };