diff --git a/client/components/dialog.jsx b/client/components/dialog.jsx index 6fbdaca06..fcbab227f 100644 --- a/client/components/dialog.jsx +++ b/client/components/dialog.jsx @@ -6,13 +6,10 @@ function Dialog({ dismissKeys, closeText = 'Close', blocking = false, ...rest }) const dialogRef = useRef(null); useEffect(()=>{ - blocking ? dialogRef.current?.showModal() : dialogRef.current?.show(); - }, [dialogRef.current]); - - console.log(dismissKeys); - if (dismissKeys.length === 0) { - return null; - } + if (dismissKeys.length !== 0) { + blocking ? dialogRef.current?.showModal() : dialogRef.current?.show(); + } + }, [dialogRef.current, dismissKeys]); const dismiss = () => { dismissKeys.forEach(key => { @@ -22,7 +19,7 @@ function Dialog({ dismissKeys, closeText = 'Close', blocking = false, ...rest }) }); dialogRef.current?.close(); }; - console.log('rendering'); + return ( {rest.children} diff --git a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx index 2f363aa2f..81aa4be12 100644 --- a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx +++ b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx @@ -22,7 +22,6 @@ const NotificationPopup = ()=>{ try { const res = await request.get('/admin/notification/all'); - console.log('res', res.body); pickActiveNotifications(res.body || []); } catch (err) { console.log(err);