🤖 Fix modal opening

This commit is contained in:
Asim Shrestha
2023-04-08 16:41:03 -07:00
parent 434136cd65
commit 8c2d922d92

View File

@@ -23,9 +23,14 @@ const Home: NextPage = () => {
const [showModal, setShowModal] = React.useState(false); const [showModal, setShowModal] = React.useState(false);
useEffect(() => { useEffect(() => {
const key = "agentgpt-modal-opened";
const savedModalData = localStorage.getItem(key);
if (savedModalData == null) {
setTimeout(() => { setTimeout(() => {
setShowModal(true); setShowModal(true);
}, 1700); }, 1700);
}
localStorage.setItem(key, JSON.stringify(true));
}, []); }, []);
const handleNewGoal = () => { const handleNewGoal = () => {