From 1675732f712ef8c14e35cd20ce506d8cdbe315d7 Mon Sep 17 00:00:00 2001 From: 0xMakka Date: Thu, 12 Dec 2024 22:00:06 +0000 Subject: [PATCH] use local storage on disclaimer modal --- app/components/DisclaimerModal/index.tsx | 4 ++-- base/components/DisclaimerModal/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/DisclaimerModal/index.tsx b/app/components/DisclaimerModal/index.tsx index 0676f7336f..67749c46c2 100644 --- a/app/components/DisclaimerModal/index.tsx +++ b/app/components/DisclaimerModal/index.tsx @@ -11,13 +11,13 @@ export const DisclaimerModal: FC = () => { useScrollLock(showModal); useEffect(() => { - if (isNil(window?.sessionStorage?.getItem("disclaimer_accepted"))) { + if (isNil(window?.localStorage?.getItem("disclaimer_accepted"))) { setShowModal(true); } }, []); const setDisclaimer = async () => { - window.sessionStorage.setItem("disclaimer_accepted", ""); + window.localStorage.setItem("disclaimer_accepted", ""); setShowModal(false); }; diff --git a/base/components/DisclaimerModal/index.tsx b/base/components/DisclaimerModal/index.tsx index 7798dd7c9f..8abbf864cf 100644 --- a/base/components/DisclaimerModal/index.tsx +++ b/base/components/DisclaimerModal/index.tsx @@ -10,13 +10,13 @@ export const DisclaimerModal: FC = () => { useScrollLock(showModal); useEffect(() => { - if (isNil(window?.sessionStorage?.getItem("disclaimer_accepted"))) { + if (isNil(window?.localStorage?.getItem("disclaimer_accepted"))) { setShowModal(true); } }, []); const setDisclaimer = async () => { - window.sessionStorage.setItem("disclaimer_accepted", ""); + window.localStorage.setItem("disclaimer_accepted", ""); setShowModal(false); };