diff --git a/src/components/_modals/SnapshotNotifyModal..tsx b/src/components/_modals/SnapshotNotifyModal..tsx new file mode 100644 index 000000000..5b9c61964 --- /dev/null +++ b/src/components/_modals/SnapshotNotifyModal..tsx @@ -0,0 +1,29 @@ +import { ModalProps, Text, Link } from "@chakra-ui/react" +import { BaseModal } from "./BaseModal" +import { useEffect } from "react" +export const SnapshotNotifyModal = ({ + isOpen, + onClose, +}: Pick) => { + useEffect(() => { + // Logic here if needed, e.g., analytics + }, [isOpen]) + + return ( + + + Complete campaigns to earn bonus SOMM rewards and/or airdrop + points. + + + ) +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 88450a167..96ae608e7 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,8 +1,32 @@ import type { NextPage } from "next" import { PageHome } from "components/_pages/PageHome" +import { useState, useEffect } from "react" +import { SnapshotNotifyModal } from "components/_modals/SnapshotNotifyModal." const Home: NextPage = () => { - return + const [isModalOpen, setIsModalOpen] = useState(false) + + useEffect(() => { + const modalShown = localStorage.getItem("modalShown") + if (!modalShown) { + setIsModalOpen(true) + localStorage.setItem("modalShown", "true") + } + }, []) + + const handleCloseModal = () => setIsModalOpen(false) + + return ( + <> + + {isModalOpen && ( + + )} + + ) } export default Home