Skip to content

Commit

Permalink
🤖 Fix modal opening
Browse files Browse the repository at this point in the history
  • Loading branch information
asim-shrestha committed Apr 8, 2023
1 parent 434136c commit 8c2d922
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ const Home: NextPage = () => {

const [showModal, setShowModal] = React.useState(false);
useEffect(() => {
setTimeout(() => {
setShowModal(true);
}, 1700);
const key = "agentgpt-modal-opened";
const savedModalData = localStorage.getItem(key);
if (savedModalData == null) {
setTimeout(() => {
setShowModal(true);
}, 1700);
}
localStorage.setItem(key, JSON.stringify(true));
}, []);

const handleNewGoal = () => {
Expand Down

0 comments on commit 8c2d922

Please sign in to comment.