Added "type" argument to flashNotification (to distinguish between error and info)

This commit is contained in:
Zef Hemel
2022-07-14 13:32:28 +02:00
parent d57a9e79de
commit a8274d225c
6 changed files with 51 additions and 21 deletions
+7 -2
View File
@@ -39,9 +39,14 @@ export function TopBar({
{prettyName(pageName)}
</span>
{notifications.length > 0 && (
<div className="status">
<div className="notifications">
{notifications.map((notification) => (
<div key={notification.id}>{notification.message}</div>
<div
key={notification.id}
className={`notification-${notification.type}`}
>
{notification.message}
</div>
))}
</div>
)}