diff --git a/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx b/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx
index f6d9e356d..dcea5eb55 100644
--- a/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx
+++ b/web/components/ui/NotifyReminderPopup/NotifyReminderPopup.tsx
@@ -1,7 +1,6 @@
import { Popover } from 'antd';
import { CloseOutlined } from '@ant-design/icons';
import React, { useState, useEffect } from 'react';
-import { LOCAL_STORAGE_KEYS, getLocalStorage } from '../../../utils/localStorage';
import s from './NotifyReminderPopup.module.scss';
interface Props {
@@ -15,11 +14,13 @@ export default function NotifyReminderPopup(props: Props) {
const { children, visible, notificationClicked, notificationClosed } = props;
const [visiblePopup, setVisiblePopup] = useState(visible);
const [mounted, setMounted] = useState(false);
- const [shouldShowPopup, setShouldShowPopup] = useState(false);
+
+ useEffect(() => {
+ setVisiblePopup(visible);
+ }, [visible]);
useEffect(() => {
setMounted(true);
- setShouldShowPopup(!getLocalStorage(LOCAL_STORAGE_KEYS.hasDisplayedNotificationModal));
}, []);
const title =
Stay updated!
;
@@ -43,20 +44,20 @@ export default function NotifyReminderPopup(props: Props) {
};
const content = (
-
+
-
);
+
return (
- mounted &&
- shouldShowPopup && (
+ mounted && (