From 6bbc87479a463a2d4bbb986a665de3d6b88fd826 Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Sun, 30 Nov 2025 22:15:49 +0700 Subject: [PATCH] feat(auth): disable registration after 23:29 WIB Nov 30, 2025 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show "Registration Closed" message after deadline 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/hackathon/src/app/auth/signup/page.tsx | 51 ++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/apps/hackathon/src/app/auth/signup/page.tsx b/apps/hackathon/src/app/auth/signup/page.tsx index f879dc1..1140d0b 100644 --- a/apps/hackathon/src/app/auth/signup/page.tsx +++ b/apps/hackathon/src/app/auth/signup/page.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useGitHubAuth, useSignup } from '@imphnen-frontend-service/service'; import { GithubOutlined } from '@ant-design/icons'; -import { useNavigate, Link, Links } from 'react-router'; +import { useNavigate, Link } from 'react-router'; import { toast } from 'sonner'; import { Icon } from '@iconify/react'; import { ThemeToggle } from '../../../components/theme-toggle'; @@ -32,8 +32,14 @@ const signupSchema = z type SignupFormData = z.infer; +// Registration deadline: 2025-11-30 23:29:00 WIB (UTC+7) +const REGISTRATION_DEADLINE = new Date('2025-11-30T16:29:00Z'); + export default function SignupPage() { const navigate = useNavigate(); + + // Check if registration is closed + const isRegistrationClosed = new Date() >= REGISTRATION_DEADLINE; const { signInWithGitHub } = useGitHubAuth(); const signupMutation = useSignup(); const [isGithubLoading, setIsGithubLoading] = useState(false); @@ -70,6 +76,49 @@ export default function SignupPage() { } }; + // Show closed registration screen + if (isRegistrationClosed) { + return ( +
+
+
+
+ +
+

+ Registration Closed +

+

+ The registration period for this hackathon has ended. +

+
+ +
+

+ Thank you for your interest! Registration closed on November 30, 2025 at 23:29 WIB. +

+ + + + + + +
+
+
+ ); + } + // Show success screen after registration if (registrationSuccess) { return (