1+ import { Status } from "@/lib/userRecord" ;
2+ import styles from "./Message.module.scss" ;
3+
4+ interface MessageProps {
5+ status : Status ;
6+ }
7+
8+ export default function Message ( { status } : MessageProps ) {
9+ let message : string ;
10+ let header : string ;
11+
12+ switch ( status ) {
13+ case Status . Pending :
14+ case Status . Reviewed : {
15+ header = "" ;
16+ message = `Thank you for submitting your application! We are currently reviewing
17+ applications on a rolling basis, and you will hear back from us soon!`
18+ break ;
19+ }
20+
21+ case Status . Accepted : {
22+ header = "Congratulations!" ;
23+ message = `Congratulations! You have been admitted to ZotHacks 2025! Please check
24+ your email to sign your waiver and confirm your attendance!` ;
25+ break ;
26+ }
27+ case Status . Waitlisted : {
28+ header = "RSVP" ;
29+ message = `Thank you for applying to ZotHacks this year. We have read through
30+ many applications so far, and are able to offer you a spot on the
31+ event waitlist. Please check your email for more info about the
32+ waitlist and waitlist walk-ins!` ;
33+ break ;
34+ }
35+ case Status . Rejected : {
36+ header = "Sorry..." ;
37+ message = `Thank you for applying to ZotHacks this year. We have read through
38+ many applications so far, and unfortunately are unable to offer you a
39+ spot at our event. We highly encourage you to continue developing your
40+ skills and passion for technology. We would love to see you apply
41+ again next year!` ;
42+ break ;
43+ }
44+
45+ case Status . Signed :
46+ case Status . Confirmed :
47+ case Status . Attending : {
48+ header = "" ;
49+ message = `` ;
50+ break ;
51+ }
52+
53+ case Status . Void : {
54+ header = "" ;
55+ message = `Unfortunately, you are not able to RSVP for IrvineHacks at this time
56+ and will not be able to come to the event. However, we would love to
57+ see you apply again next year!` ;
58+ break ;
59+ }
60+
61+ default : {
62+ const exhaustiveCheck : never = status ;
63+ throw new Error ( `Unhandled status: ${ exhaustiveCheck } ` ) ;
64+ }
65+ }
66+
67+ return (
68+ < div className = { styles . messageWrapper } >
69+ < h4 > { header } </ h4 >
70+ < p > { message } </ p >
71+ </ div >
72+ ) ;
73+ }
0 commit comments