diff --git a/components/hacker/HackerDash.tsx b/components/hacker/HackerDash.tsx index be22ddf6..57c04434 100644 --- a/components/hacker/HackerDash.tsx +++ b/components/hacker/HackerDash.tsx @@ -56,11 +56,17 @@ export default function HackerDash({ userApplicationStatus, setUserApplicationSt '/api/hackathon-settings', async url => { const res = await fetch(url, { method: 'GET' }); - return (await res.json()) as HackathonSettingsData; + + const hackathongSetting = (await res.json()) as HackathonSettingsData; + // const hackathonStartDate = parse(hackathongSetting.HACKATHON_START, 'MM/dd/yyyy HH:mm a', new Date()); + const curDate = new Date(); + // setHackathonStarted(curDate < hackathongSetting.HACKATHON_START); }, { revalidateOnFocus: false, revalidateOnMount: true } ); + const [hackathonStarted, setHackathonStarted] = useState(false); + const onFinish = async (values: any) => { setLoading(true); await fetch('/api/apply', { @@ -699,40 +705,40 @@ export default function HackerDash({ userApplicationStatus, setUserApplicationSt <>
{setting?.HACKATHON_START}
+ {/*{setting?.HACKATHON_START}
*/} {/* TODO: conditionally render hacking start and end code based on time stored in db */} {/* Hacking start code */} - {/*