@@ -11,6 +11,7 @@ import { Link } from 'react-router-dom';
1111import Typography from '@material-ui/core/Typography' ;
1212import AdminForm from 'components/shiptalent/forms/adminForm' ;
1313import Spacer from 'components/general/spacer' ;
14+ import DashboardItem from './DashboardItem' ;
1415import AdminAPI from 'apis/adminAPIs' ;
1516import { adminStyles } from 'styles' ;
1617
@@ -48,100 +49,34 @@ class Dashboard extends React.Component {
4849
4950 return (
5051 < div >
51- < Grid container spacing = { 16 } >
52+ < Grid container spacing = { 8 } >
5253 < Grid item xs = { 12 } > < Spacer size = { 10 } /> </ Grid >
5354 < Grid xs = { 1 } />
5455 < Grid item xs = { 10 } >
5556 < Grid container spacing = { 32 } direction = "row" justify = "column" alignItems = "center" >
5657 < 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' />
6459 </ Grid >
6560
6661 < 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 } />
7863 </ Grid >
7964 < 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 } />
9166 </ Grid >
9267
9368 < 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 } />
10570 </ Grid >
10671 < 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' />
11873 </ Grid >
11974
12075 < 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 } />
13277 </ Grid >
13378 < 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 } />
14580 </ Grid >
14681
14782 </ Grid >
0 commit comments