diff --git a/components/Marathon/SignUp/ConfirmForm.jsx b/components/Marathon/SignUp/ConfirmForm.jsx index 772566c6..35df3ab0 100644 --- a/components/Marathon/SignUp/ConfirmForm.jsx +++ b/components/Marathon/SignUp/ConfirmForm.jsx @@ -268,6 +268,12 @@ export default function ConfirmForm({ } }, [userState, openLoginModal]); const onSubmit = async () => { + const isSignupEnabled = false; + + if (!isSignupEnabled) { + alert('申請已截止'); + return; + } if (!marathonState) { console.error('no data to submit'); return; diff --git a/components/Marathon/SignUp/MarathonForm.jsx b/components/Marathon/SignUp/MarathonForm.jsx index b23ca95a..d51cfeb3 100644 --- a/components/Marathon/SignUp/MarathonForm.jsx +++ b/components/Marathon/SignUp/MarathonForm.jsx @@ -234,6 +234,12 @@ export default function MarathonForm({ }; const onNextStep = () => { + const isSignupEnabled = false; + + if (!isSignupEnabled) { + alert('申請已截止'); + return; + } const isValid = handleValidateAll(); if (!isValid) { toast.error('請修正錯誤'); diff --git a/pages/learning-marathon/index.jsx b/pages/learning-marathon/index.jsx index 7b9e579f..21c315ad 100644 --- a/pages/learning-marathon/index.jsx +++ b/pages/learning-marathon/index.jsx @@ -295,6 +295,12 @@ const LearningMarathon = () => { ); const handleClickSignupButton = () => { + const isSignupEnabled = false; + + if (!isSignupEnabled) { + alert('申請已截止'); + return; + } logEvent('Learning Marathon', 'Signup Button Clicked', { user_logged_in: isLoggedIn, user_temporary: isTemporary