Skip to content

Commit 981c29a

Browse files
author
N. Justus
committed
only display notifications if they aren't empty
1 parent eb8ccbe commit 981c29a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ui/src/partials/container.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@ class WmContainerCon extends React.Component<any, any> {
6161
</div>
6262
)}
6363
</Navbar>
64-
<div className="position-absolute w-100 d-flex flex-row-reverse p-4 fixed-bottom" style={{zIndex:100}}>
65-
<div className="d-flex flex-column">
66-
{ /** all info notifications are displayed bottom-right as toasts */
67-
this.props.notifications.filter((n: Notification) => n.type === NotificationType.Info).map((n: Notification, idx: number) => (<NotificationComponent key={idx} notification={n} />))}
68-
</div>
69-
</div>
64+
{ !R.isEmpty(this.props.notifications) && (
65+
<div className="position-absolute w-100 d-flex flex-row-reverse p-4 fixed-bottom" style={{zIndex:100}}>
66+
<div className="d-flex flex-column">
67+
{ /** all info notifications are displayed bottom-right as toasts */
68+
this.props.notifications.filter((n: Notification) => n.type === NotificationType.Info).map((n: Notification, idx: number) => (<NotificationComponent key={idx} notification={n} />))}
69+
</div>
70+
</div>
71+
)}
7072
<div className="container-fluid py-2">
7173
<Row><Col xs='12'>
7274
{ /** all other notifications are displayed as Alerts on-top of all children */

0 commit comments

Comments
 (0)