diff --git a/components/BalanceReminder/index.tsx b/components/BalanceReminder/index.tsx index bcac8d0b..4d8d6460 100644 --- a/components/BalanceReminder/index.tsx +++ b/components/BalanceReminder/index.tsx @@ -22,11 +22,14 @@ const BalanceReminder = () => { ...accountSupplied.map((token) => ({ ...token, type: "main" })), ...accountSuppliedMEME.map((token) => ({ ...token, type: "meme" })), ]; + const [lastClosedDate, setLastClosedDate] = useState(() => + localStorage.getItem("balanceReminderLastClosed"), + ); + const Unreminded = useMemo(() => { - const lastClosedDate = localStorage.getItem("balanceReminderLastClosed"); const today = new Date().toDateString(); return !lastClosedDate || lastClosedDate !== today; - }, []); + }, [lastClosedDate]); const dispatch = useDispatch(); useEffect(() => { const hasValidAccountSupplied = @@ -54,6 +57,7 @@ const BalanceReminder = () => { function closeTip() { const today = new Date().toDateString(); localStorage.setItem("balanceReminderLastClosed", today); + setLastClosedDate(today); setShouldShow(false); } if (!shouldShow) { diff --git a/components/HashResultModal/ModalWithChangeCollateral.tsx b/components/HashResultModal/ModalWithChangeCollateral.tsx index 56226c81..d8b66de5 100644 --- a/components/HashResultModal/ModalWithChangeCollateral.tsx +++ b/components/HashResultModal/ModalWithChangeCollateral.tsx @@ -119,7 +119,7 @@ const ModalWithChangeCollateral = ({ */}
{data.symbol}
{data.symbol}