Skip to content
Snippets Groups Projects
Commit 2f3ef1d2 authored by Marek Veselý's avatar Marek Veselý
Browse files

Merge branch '280-notification-button-pops-up-when-no-notifications-are-present' into 'master'

Resolve "Notification Button pops up when no notifications are present"

Closes #280

See merge request inject/frontend!209
parents 3ccf2a99 8c736617
No related branches found
No related tags found
No related merge requests found
import type { Intent } from '@blueprintjs/core'
import { Button } from '@blueprintjs/core'
import { Button, NonIdealState } from '@blueprintjs/core'
import { css } from '@emotion/css'
import type { Placement } from '@floating-ui/react'
import type { FC } from 'react'
......@@ -39,9 +39,15 @@ const NotificationDropdown: FC<NotificationDropdownProps> = ({
children: (
<div className={notificationBox}>
<div style={{ overflowY: 'auto' }}>
{(value ?? []).map(x => (
<Notifications key={x.timestamp} {...x} />
))}
{value && value.length > 0 ? (
value.map(x => <Notifications key={x.timestamp} {...x} />)
) : (
<NonIdealState
icon='low-voltage-pole'
title='No notifications'
description='There are no notifications to display'
/>
)}
</div>
<div>
<Button
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment