0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +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 = ()=>{
if(error) {
if(error)
return <div className='error'>{error}</div>;
}
if(notifications.length === 0) {
if(notifications.length === 0)
return <div className='noNotification'>No notifications available.</div>;
}
return (
<ul className='notificationList'>
@@ -86,8 +84,8 @@ const NotificationLookup = ()=>{
<details>
<summary>{notification.title || 'No Title'}</summary>
<NotificationDetail notification={notification} onDelete={deleteNotification} />
</details></li>
</details>
</li>
))}
</ul>
);
@@ -95,8 +93,9 @@ const NotificationLookup = ()=>{
return (
<div className='notificationLookup'>
<h2>Check all Notifications</h2><button onClick={lookupAll}>
<i className={`fas ${searching ? 'fa-spin fa-spinner' : 'fa-search'}`} />
<h2>Check all Notifications</h2>
<button onClick={lookupAll}>
<i className={`fas ${searching ? 'fa-spin fa-spinner' : 'fa-search'}`} />
</button>
{renderNotificationsList()}
</div>