@@ -11,6 +11,7 @@ import { Link } from 'react-router-dom';
11
11
import Typography from '@material-ui/core/Typography' ;
12
12
import AdminForm from 'components/shiptalent/forms/adminForm' ;
13
13
import Spacer from 'components/general/spacer' ;
14
+ import DashboardItem from './DashboardItem' ;
14
15
import AdminAPI from 'apis/adminAPIs' ;
15
16
import { adminStyles } from 'styles' ;
16
17
@@ -48,100 +49,34 @@ class Dashboard extends React.Component {
48
49
49
50
return (
50
51
< div >
51
- < Grid container spacing = { 16 } >
52
+ < Grid container spacing = { 8 } >
52
53
< Grid item xs = { 12 } > < Spacer size = { 10 } /> </ Grid >
53
54
< Grid xs = { 1 } />
54
55
< Grid item xs = { 10 } >
55
56
< Grid container spacing = { 32 } direction = "row" justify = "column" alignItems = "center" >
56
57
< Grid item xs = { 12 } >
57
- < Link to = '/admin/profile-search' >
58
- < Panel >
59
- < Typography className = { classes . adminCastingRequestGroupButtonTitle } >
60
- PROFILE SEARCH
61
- </ Typography >
62
- </ Panel >
63
- </ Link >
58
+ < DashboardItem path = '/admin/profile-search' title = 'PROFILE SEARCH' />
64
59
</ Grid >
65
60
66
61
< Grid item xs = { 6 } >
67
- < Link to = { '/admin/new-profiles' } >
68
- < Panel >
69
- < Typography className = { classes . adminCastingRequestGroupButtonTitle } >
70
- NEW PROFILE
71
- </ Typography >
72
- < Spacer size = { 10 } />
73
- < Typography className = { classNames ( classes . adminCastingRequestGroupButtonSubTitle , classes . red ) } >
74
- { newProfiles }
75
- </ Typography >
76
- </ Panel >
77
- </ Link >
62
+ < DashboardItem path = '/admin/new-profiles' title = 'NEW PROFILE' subTitle = { newProfiles } />
78
63
</ Grid >
79
64
< Grid item xs = { 6 } >
80
- < Link to = '/admin/edit-profiles' >
81
- < Panel >
82
- < Typography className = { classes . adminCastingRequestGroupButtonTitle } >
83
- EDIT PROFILE
84
- </ Typography >
85
- < Spacer size = { 10 } />
86
- < Typography className = { classNames ( classes . adminCastingRequestGroupButtonSubTitle , classes . red ) } >
87
- { editProfiles }
88
- </ Typography >
89
- </ Panel >
90
- </ Link >
65
+ < DashboardItem path = '/admin/edit-profiles' title = 'EDIT PROFILE' subTitle = { editProfiles } />
91
66
</ Grid >
92
67
93
68
< Grid item xs = { 6 } >
94
- < Link to = { '/admin/casting-requests' } >
95
- < Panel >
96
- < Typography className = { classes . adminCastingRequestGroupButtonTitle } >
97
- CASTING REQUESTS
98
- </ Typography >
99
- < Spacer size = { 10 } />
100
- < Typography className = { classNames ( classes . adminCastingRequestGroupButtonSubTitle , classes . red ) } >
101
- { castingRequests }
102
- </ Typography >
103
- </ Panel >
104
- </ Link >
69
+ < DashboardItem path = '/admin/casting-requests' title = 'CASTING REQUESTS' subTitle = { castingRequests } />
105
70
</ Grid >
106
71
< Grid item xs = { 6 } >
107
- < Link to = '/admin/metrics-tools' >
108
- < Panel >
109
- < Typography className = { classes . adminCastingRequestGroupButtonTitle } >
110
- METRICS TOOLS
111
- </ Typography >
112
- < Spacer size = { 10 } />
113
- < Typography className = { classNames ( classes . adminCastingRequestGroupButtonSubTitle , classes . red ) } >
114
- < Spacer size = { 24 } />
115
- </ Typography >
116
- </ Panel >
117
- </ Link >
72
+ < DashboardItem path = '/admin/metrics-tools' title = 'METRICS TOOLS' />
118
73
</ Grid >
119
74
120
75
< Grid item xs = { 6 } >
121
- < Link to = { '/admin/dance-combo-lockouts' } >
122
- < Panel >
123
- < Typography className = { classes . adminCastingRequestGroupButtonTitle } >
124
- DANCE COMBO LOCKOUTS
125
- </ Typography >
126
- < Spacer size = { 10 } />
127
- < Typography className = { classNames ( classes . adminCastingRequestGroupButtonSubTitle , classes . red ) } >
128
- { danceComboLockouts }
129
- </ Typography >
130
- </ Panel >
131
- </ Link >
76
+ < DashboardItem path = '/admin/dance-combo-lockouts' title = 'DANCE COMBO LOCKOUTS' subTitle = { danceComboLockouts } />
132
77
</ Grid >
133
78
< Grid item xs = { 6 } >
134
- < Link to = '/admin/medicial-disclosure' >
135
- < Panel >
136
- < Typography className = { classes . adminCastingRequestGroupButtonTitle } >
137
- MEDICIAL DISCLOSURE
138
- </ Typography >
139
- < Spacer size = { 10 } />
140
- < Typography className = { classNames ( classes . adminCastingRequestGroupButtonSubTitle , classes . red ) } >
141
- { medicalDisclosures }
142
- </ Typography >
143
- </ Panel >
144
- </ Link >
79
+ < DashboardItem path = '/admin/medicial-disclosure' title = 'MEDICIAL DISCLOSURE' subTitle = { medicalDisclosures } />
145
80
</ Grid >
146
81
147
82
</ Grid >
0 commit comments