Skip to content

Commit

Permalink
update apps open and close dates
Browse files Browse the repository at this point in the history
  • Loading branch information
waalbert committed Nov 25, 2024
1 parent 74cbd50 commit 607045b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/routers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

router = APIRouter()

DEADLINE = datetime(2024, 1, 15, 8, 1, tzinfo=timezone.utc)
DEADLINE = datetime(2025, 1, 11, 8, 1, tzinfo=timezone.utc)


class IdentityResponse(BaseModel):
Expand Down
8 changes: 6 additions & 2 deletions apps/site/src/app/(main)/(home)/sections/Landing/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import { Suspense } from "react";
import { PerspectiveCamera } from "@react-three/drei";

import hasDeadlinePassed from "@/lib/utils/hasDeadlinePassed";
import haveApplicationsOpened from "@/lib/utils/haveApplicationsOpened";
import View from "@/components/canvas/View";
import Button from "@/lib/components/Button/Button";

import styles from "./Landing.module.css";

const Landing = () => {
const deadlinePassed = hasDeadlinePassed();
const applicationsOpened = haveApplicationsOpened();

return (
<section className={styles.landingBackground}>
Expand All @@ -25,9 +27,11 @@ const Landing = () => {
IrvineHacks 2025
</h1>
{deadlinePassed ? (
<Button className="z-10" text="Coming Soon..." disabled />
) : (
<Button className="z-10" text="Applications have closed!" disabled />
) : applicationsOpened ? (
<Button className="z-10" text="Apply" href="/apply" />
) : (
<Button className="z-10" text="Coming Soon..." disabled />
)}
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/lib/utils/hasDeadlinePassed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default function hasDeadlinePassed() {
const pstDeadline = "2024-01-15T00:00:59";
const pstDeadline = "2025-01-11T00:00:59";
const utcOffset = "-08:00";

const deadline = new Date(pstDeadline + utcOffset);
Expand Down
9 changes: 9 additions & 0 deletions apps/site/src/lib/utils/haveApplicationsOpened.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default function haveApplicationsOpened() {
const pstDeadline = "2024-12-6T00:00:59";
const utcOffset = "-08:00";

const deadline = new Date(pstDeadline + utcOffset);
const now = new Date();

return now > deadline;
}

0 comments on commit 607045b

Please sign in to comment.