Skip to content

Commit

Permalink
[#1076,theme][s]: remove popup for signup to coco 101 course.
Browse files Browse the repository at this point in the history
- no longer our main course and annoying for new visitors who don't know about us
  • Loading branch information
rufuspollock committed Apr 26, 2024
1 parent 017d0d5 commit 3f88974
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,8 @@ function collectHeadings(nodes) {
}

function MyApp({ Component, pageProps }) {
const [showModal, setShowModal] = useState(false);
const router = useRouter();

const handleClose = () => {
// Close the modal
setShowModal(false);

// Set the 'showedModal' key in localStorage
window.localStorage.setItem('showedModal', 'true');
};

const handleSignup = () => {
handleClose();

// Redirect to the signup page
router.push('/conscious-coliving-course');
};

useEffect(() => {
// Check if the 'showedModal' key exists in localStorage
const hasShownModal = window.localStorage.getItem('showedModal');

// If it doesn't exist, display the modal
if (!hasShownModal) {
setTimeout(() => {
setShowModal(true);
}, 5000);
}
}, []);

useEffect(() => {
if (siteConfig.analytics) {
const handleRouteChange = (url) => {
Expand Down

0 comments on commit 3f88974

Please sign in to comment.