Skip to content

Commit

Permalink
added more informative alerts to dashboard dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
pm3512 committed Jan 3, 2024
1 parent 5af3b34 commit 3fde9a4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 14 deletions.
6 changes: 5 additions & 1 deletion src/components/auth/AuthenticationDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,12 @@ const AuthenticationDialog = ({
</div>
</form>
</div>
<Alert severity="warning" className={styles.warning}>
Participants must be at least 18 years old
</Alert>
<Alert severity="info" className={styles.warning}>
Participants must be undergraduates and at least 18 years old
Applications close at 11:59pm EST on January 19th for non-CMU students
and on January 26th for CMU students
</Alert>
</div>
)
Expand Down
44 changes: 31 additions & 13 deletions src/components/dashboard/DashboardDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ const getDialogText = (
closeTime: string,
confirmTime: string
): ReactElement => {
if (status === Status.VERIFIED) {
if (status === Status.UNVERIFIED) {
return (
<div className={styles.dialogText}>
<Typography variant="body1">
Check your email to get verified
</Typography>
</div>
)
} else if (status === Status.VERIFIED) {
return (
<>
<div className={styles.dialogText}>
Expand All @@ -42,30 +50,35 @@ const getDialogText = (
</div>
<div className={styles.dialogText}>
<Typography variant="body1">
If you do not complete your application by
<br />
<span className={styles.deadline}>{closeTime}</span>, you will not
be admitted!
Non-CMU students need to complete their application by 11:59pm EST,
January 19th.
</Typography>
</div>
<div className={styles.dialogText}>
<Typography variant="body1">
CMU students have time until January 26th.
</Typography>
</div>
</>
)
} else if (status == Status.COMPLETED_PROFILE) {
return (
<>
{/**
TODO uncomment
<div className={styles.dialogText}>
<Typography variant="body1">Welcome back!</Typography>
<Typography variant="body1">Thank you for applying!</Typography>
</div>
<div className={styles.dialogText}>
<Typography variant="body1">
Once we consider your application, you will receive an email from{" "}
<b>[email protected]</b>
</Typography>
</div>
<div className={styles.dialogText}>
<Typography variant="body1">
You can edit your information until
<br />
<span className={styles.deadline}>{confirmTime}</span>
In the meantime, you can edit your application by clicking the
button below
</Typography>
</div>
*/}
</>
)
} else if (status === Status.ADMITTED) {
Expand Down Expand Up @@ -101,6 +114,8 @@ const getDialogText = (
<Typography variant="body1">
In the meantime, join a team or create one with your friends!
</Typography>
{/**
*
<br />
<Typography variant="body1">
Once you&apos;re all set, download TartanHacks Dashboard!
Expand Down Expand Up @@ -143,6 +158,7 @@ const getDialogText = (
</RectangleButton>
</Link>
</div>
*/}
</div>
</>
)
Expand Down Expand Up @@ -232,7 +248,9 @@ const getButtonBox = (
color: "red"
}}
>
You need to confirm in order to attend the event
<Alert severity="warning">
You need to confirm in order to attend the event!
</Alert>
</Typography>
</>
)
Expand Down

0 comments on commit 3fde9a4

Please sign in to comment.