@@ -19,6 +19,7 @@ const typeMap = {
1919 visual_design : 'Visual Design Project' ,
2020 visual_prototype : 'Visual Prototype Project'
2121}
22+
2223/*eslint-enable camelcase */
2324const ProjectType = ( { projectId, type, description, devices} ) => (
2425 < PanelProject >
@@ -32,20 +33,25 @@ const ProjectType = ({projectId, type, description, devices}) => (
3233 text = { description }
3334 textTruncateChild = { < Link className = "read-more-link" to = { `/projects/${ projectId } /specification` } > read more ></ Link > }
3435 />
36+
3537 < div className = "project-icons" >
36- < div className = "icon-set" >
37- { devices . slice ( 0 , 3 ) . map ( ( device ) => deviceMap [ device ] ) }
38- </ div >
39- { devices . length > 3 && < div className = "icon-set" >
40- { devices . slice ( 3 ) . map ( ( device ) => deviceMap [ device ] ) }
41- </ div > }
38+ { type === 'generic' &&
39+ < div key = "GENERIC" className = "icon icon-work-project" > Work Project</ div > }
40+ { type !== 'generic' &&
41+ < div className = "icon-set" >
42+ { devices . slice ( 0 , 3 ) . map ( ( device ) => deviceMap [ device ] ) }
43+ </ div > }
44+ { type !== 'generic' && devices . length > 3 && < div className = "icon-set" >
45+ { devices . slice ( 3 ) . map ( ( device ) => deviceMap [ device ] ) }
46+ </ div > }
4247 </ div >
48+
4349 </ PanelProject >
4450)
4551
4652ProjectType . propTypes = {
4753 type : PropTypes . string . isRequired ,
48- devices : PropTypes . arrayOf ( PropTypes . oneOf ( [ 'phone' , 'tablet' , 'desktop' , 'apple-watch' , 'android-watch' ] ) ) . isRequired
54+ devices : PropTypes . arrayOf ( PropTypes . oneOf ( [ 'generic' , ' phone', 'tablet' , 'desktop' , 'apple-watch' , 'android-watch' ] ) ) . isRequired
4955}
5056
5157ProjectType . defaultProps = {
0 commit comments