mirror of
https://github.com/aljazceru/AgentGPT.git
synced 2025-12-17 05:54:20 +01:00
🤖 Fix modal opening
This commit is contained in:
@@ -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 = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user