Skip to content

Commit

Permalink
Merge pull request #248 from daodaoedu/dev
Browse files Browse the repository at this point in the history
fix:disable marathon apply
  • Loading branch information
vincentxuu authored Jan 24, 2025
2 parents b16bc28 + 8f8c633 commit 378bafe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/Marathon/SignUp/ConfirmForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions components/Marathon/SignUp/MarathonForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ export default function MarathonForm({
};

const onNextStep = () => {
const isSignupEnabled = false;

if (!isSignupEnabled) {
alert('申請已截止');
return;
}
const isValid = handleValidateAll();
if (!isValid) {
toast.error('請修正錯誤');
Expand Down
6 changes: 6 additions & 0 deletions pages/learning-marathon/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 378bafe

Please sign in to comment.