Skip to content

Commit d510d73

Browse files
committed
hi
1 parent 918162f commit d510d73

File tree

1 file changed

+7
-6
lines changed
  • client/src/components/DashboardStatus

1 file changed

+7
-6
lines changed

client/src/components/DashboardStatus/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,22 @@ const statusText = (status: string) => {
2626
return formatted.charAt(0).toUpperCase() + formatted.slice(1);
2727
};
2828

29-
const DashboardStatus = ({ status, timeline }: DashboardStatusProps) => {
30-
let statusDescription = '';
29+
const getStatusDescription = (status: string) => {
3130
switch (status) {
3231
case 'SUBMITTED':
33-
statusDescription = 'Congrats on applying to DiamondHacks!';
32+
return 'Congrats on applying to DiamondHacks!';
3433
default:
35-
statusDescription =
36-
'Our records have indicated that you have not started on your application. Click below to go on your hacker journey!';
34+
return 'Our records have indicated that you have not started on your application. Click below to go on your hacker journey!';
3735
}
36+
};
37+
38+
const DashboardStatus = ({ status, timeline }: DashboardStatusProps) => {
3839
// TODO
3940
return (
4041
<>
4142
<div className={`${styles.badge} ${styles[status]}`}>Status: {statusText(status)}</div>
4243
<Typography variant="body/large" component="p">
43-
{statusDescription}
44+
{getStatusDescription(status)}
4445
</Typography>
4546
<Typography variant="body/large" component="p">
4647
Please note that applications are due on {dateFormat.format(timeline.application)}.

0 commit comments

Comments
 (0)