File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
client/src/components/DashboardStatus Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -26,21 +26,22 @@ const statusText = (status: string) => {
26
26
return formatted . charAt ( 0 ) . toUpperCase ( ) + formatted . slice ( 1 ) ;
27
27
} ;
28
28
29
- const DashboardStatus = ( { status, timeline } : DashboardStatusProps ) => {
30
- let statusDescription = '' ;
29
+ const getStatusDescription = ( status : string ) => {
31
30
switch ( status ) {
32
31
case 'SUBMITTED' :
33
- statusDescription = 'Congrats on applying to DiamondHacks!' ;
32
+ return 'Congrats on applying to DiamondHacks!' ;
34
33
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!' ;
37
35
}
36
+ } ;
37
+
38
+ const DashboardStatus = ( { status, timeline } : DashboardStatusProps ) => {
38
39
// TODO
39
40
return (
40
41
< >
41
42
< div className = { `${ styles . badge } ${ styles [ status ] } ` } > Status: { statusText ( status ) } </ div >
42
43
< Typography variant = "body/large" component = "p" >
43
- { statusDescription }
44
+ { getStatusDescription ( status ) }
44
45
</ Typography >
45
46
< Typography variant = "body/large" component = "p" >
46
47
Please note that applications are due on { dateFormat . format ( timeline . application ) } .
You can’t perform that action at this time.
0 commit comments