1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

fix eslint

This commit is contained in:
Fedor Katurov 2023-10-30 21:49:10 +06:00
parent e4b158dada
commit a26e4168fd
80 changed files with 199 additions and 205 deletions

View file

@ -23,23 +23,27 @@ const NotificationList: FC<NotificationListProps> = () => {
useEffect(() => {
return () => markAsRead();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const renderItem = useCallback((item: NotificationItem) => {
const isNew =
!lastSeen ||
!item.created_at ||
isAfter(parseISO(item.created_at), lastSeen);
switch (item.type) {
case NotificationType.Comment:
case NotificationType.Boris:
return <NotificationComment item={item} isNew={isNew} />;
case NotificationType.Node:
return <NotificationNode item={item} isNew={isNew} />;
default:
return null;
}
}, []);
const renderItem = useCallback(
(item: NotificationItem) => {
const isNew =
!lastSeen ||
!item.created_at ||
isAfter(parseISO(item.created_at), lastSeen);
switch (item.type) {
case NotificationType.Comment:
case NotificationType.Boris:
return <NotificationComment item={item} isNew={isNew} />;
case NotificationType.Node:
return <NotificationNode item={item} isNew={isNew} />;
default:
return null;
}
},
[lastSeen],
);
if (isLoading) {
return <LoaderScreen align="top" />;