diff --git a/apps/site/src/app/portal/Message.tsx b/apps/site/src/app/portal/Message.tsx new file mode 100644 index 000000000..d65844c8e --- /dev/null +++ b/apps/site/src/app/portal/Message.tsx @@ -0,0 +1,36 @@ +import { PortalStatus } from "./page"; + +interface MessageProps { + status: PortalStatus; +} + +function Message({ status }: MessageProps) { + const submittedMessage = ( +

+ Thank you for submitting your application! We are currently + reviewing applications on a rolling basis, and you will hear back + from us soon! +

+ ); + + const messages: Record = { + [PortalStatus.pending]: submittedMessage, + [PortalStatus.reviewed]: submittedMessage, + [PortalStatus.rejected]: ( +

+ Thank you for applying to IrvineHacks this year. We have read + through many applications so far, and unfortunately are unable + to offer you a spot at our event. We highly encourage you to + continue developing your skills and passion for technology. We + would love to see you apply again next year! +

+ ), + [PortalStatus.waitlisted]: <>, + [PortalStatus.accepted]: <>, + [PortalStatus.confirmed]: <>, + }; + + return
{messages[status]}
; +} + +export default Message; diff --git a/apps/site/src/app/portal/Portal.module.scss b/apps/site/src/app/portal/Portal.module.scss new file mode 100644 index 000000000..3f271463a --- /dev/null +++ b/apps/site/src/app/portal/Portal.module.scss @@ -0,0 +1,3 @@ +.title { + text-shadow: 0px 0px 20px rgba(255, 255, 255, 0.75); +} diff --git a/apps/site/src/app/portal/VerticalTimeline.tsx b/apps/site/src/app/portal/VerticalTimeline.tsx new file mode 100644 index 000000000..f7eb4a578 --- /dev/null +++ b/apps/site/src/app/portal/VerticalTimeline.tsx @@ -0,0 +1,89 @@ +import Image from "next/image"; + +import BorderCircle from "@/assets/icons/border-circle.svg"; +import CheckCircle from "@/assets/icons/check-circle-fill.svg"; +import XCircle from "@/assets/icons/x-circle-fill.svg"; + +import { PortalStatus } from "./page"; + +interface VerticalTimelineProps { + status: string; +} + +function VerticalTimeline({ status }: VerticalTimelineProps) { + const submission_component = ( +
  • + checked-circle + Application submitted +
  • + ); + + const verdict_component = + status === PortalStatus.accepted || + status === PortalStatus.confirmed ? ( +
  • + checked-circle + Application accepted +
  • + ) : status === PortalStatus.rejected ? ( +
  • + checked-circle + Application rejected +
  • + ) : null; + + const rsvp_component = + status === PortalStatus.accepted ? ( +
  • + border-circle + Confirm attendance +
  • + ) : status === PortalStatus.confirmed ? ( +
  • + checked-circle + Attendance confirmed +
  • + ) : null; + + return ( +
    + +
    + ); +} + +export default VerticalTimeline; diff --git a/apps/site/src/app/portal/page.tsx b/apps/site/src/app/portal/page.tsx new file mode 100644 index 000000000..870514d61 --- /dev/null +++ b/apps/site/src/app/portal/page.tsx @@ -0,0 +1,45 @@ +import Head from "next/head"; +import axios from "axios"; + +import styles from "./Portal.module.scss"; + +import VerticalTimeline from "./VerticalTimeline"; +import Message from "./Message"; + +export const enum PortalStatus { + pending = "PENDING_REVIEW", + reviewed = "REVIEWED", + accepted = "ACCEPTED", + rejected = "REJECTED", + waitlisted = "WAITLISTED", + confirmed = "CONFIRMED", +} + +export default async function Portal() { + // const res = await axios.get(`/api/user/me`); + // const identity = res.data; + + const status = PortalStatus.pending; + + return ( + <> +
    +
    + + Portal | IrvineHacks 2024 + +

    + Portal +

    +
    +
    +

    Status

    + + +
    +
    + + ); +} diff --git a/apps/site/src/assets/icons/border-circle.svg b/apps/site/src/assets/icons/border-circle.svg new file mode 100644 index 000000000..2b690c0ee --- /dev/null +++ b/apps/site/src/assets/icons/border-circle.svg @@ -0,0 +1,3 @@ + circle + + \ No newline at end of file diff --git a/apps/site/src/assets/icons/check-circle-fill.svg b/apps/site/src/assets/icons/check-circle-fill.svg new file mode 100644 index 000000000..5bcb0e2eb --- /dev/null +++ b/apps/site/src/assets/icons/check-circle-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/apps/site/src/assets/icons/x-circle-fill.svg b/apps/site/src/assets/icons/x-circle-fill.svg new file mode 100644 index 000000000..f5f6fa177 --- /dev/null +++ b/apps/site/src/assets/icons/x-circle-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file