Skip to content

Commit

Permalink
fix: Test/Start buttons unable to click. (#4666)
Browse files Browse the repository at this point in the history
* filter hidden card, do not render empty container

* update

Co-authored-by: Dong Lei <donglei@microsoft.com>
  • Loading branch information
zhixzhan and boydc2014 committed Nov 4, 2020
1 parent 3d481ce commit 9ae7237
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import isEmpty from 'lodash/isEmpty';
import { useRecoilValue } from 'recoil';

import { dispatcherState } from '../../recoilModel';
Expand All @@ -22,9 +23,11 @@ const container = css`
// -------------------- NotificationContainer -------------------- //

export const NotificationContainer = () => {
const notifications = useRecoilValue(notificationsSelector);
const notifications = useRecoilValue(notificationsSelector).filter(({ hidden }) => !hidden);
const { deleteNotification, hideNotification } = useRecoilValue(dispatcherState);

if (isEmpty(notifications)) return null;

return (
<div css={container} role="presentation">
{notifications.map((item) => {
Expand Down

0 comments on commit 9ae7237

Please sign in to comment.