0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-05 21:02:43 +00:00

Merge branch 'experimentalNotificationDB' of https://github.com/G-Ambatte/homebrewery into experimentalNotificationDB

This commit is contained in:
Víctor Losada Hernández
2024-09-18 21:47:05 +02:00

View File

@@ -71,13 +71,11 @@ const NotificationLookup = ()=>{
} }
const renderNotificationsList = ()=>{ const renderNotificationsList = ()=>{
if(error) { if(error)
return <div className='error'>{error}</div>; return <div className='error'>{error}</div>;
}
if(notifications.length === 0) { if(notifications.length === 0)
return <div className='noNotification'>No notifications available.</div>; return <div className='noNotification'>No notifications available.</div>;
}
return ( return (
<ul className='notificationList'> <ul className='notificationList'>
@@ -86,8 +84,8 @@ const NotificationLookup = ()=>{
<details> <details>
<summary>{notification.title || 'No Title'}</summary> <summary>{notification.title || 'No Title'}</summary>
<NotificationDetail notification={notification} onDelete={deleteNotification} /> <NotificationDetail notification={notification} onDelete={deleteNotification} />
</details></li> </details>
</li>
))} ))}
</ul> </ul>
); );
@@ -95,8 +93,9 @@ const NotificationLookup = ()=>{
return ( return (
<div className='notificationLookup'> <div className='notificationLookup'>
<h2>Check all Notifications</h2><button onClick={lookupAll}> <h2>Check all Notifications</h2>
<i className={`fas ${searching ? 'fa-spin fa-spinner' : 'fa-search'}`} /> <button onClick={lookupAll}>
<i className={`fas ${searching ? 'fa-spin fa-spinner' : 'fa-search'}`} />
</button> </button>
{renderNotificationsList()} {renderNotificationsList()}
</div> </div>