File tree Expand file tree Collapse file tree 1 file changed +28
-17
lines changed
src/components/Application Expand file tree Collapse file tree 1 file changed +28
-17
lines changed Original file line number Diff line number Diff line change @@ -4,23 +4,34 @@ import { navigate } from 'gatsby';
44import CardContent from '@material-ui/core/CardContent' ;
55import Typography from '@material-ui/core/Typography' ;
66import Card from '@material-ui/core/Card' ;
7+ import { CardHeader } from '@material-ui/core' ;
78
8- const Application = ( { name, description, url } ) => (
9- < Card style = { { height : '100%' } } >
10- < CardActionArea
11- style = { { height : '100%' } }
12- onClick = { ( ) => navigate ( url ) }
13- >
14- < CardContent >
15- < Typography variant = "h6" color = "textPrimary" paragraph >
16- { name }
17- </ Typography >
18- < Typography color = "textSecondary" paragraph >
19- { description }
20- </ Typography >
21- </ CardContent >
22- </ CardActionArea >
23- </ Card >
24- ) ;
9+ const Application = ( { name, description, url } ) => {
10+ /**
11+ * Go to the designated URL
12+ */
13+ const goToUrl = ( ) => {
14+ navigate ( url ) ;
15+ } ;
16+
17+ return (
18+ < Card style = { { height : '100%' } } >
19+ < CardHeader
20+ title = { name }
21+ style = { { cursor : 'pointer' } }
22+ onClick = { goToUrl }
23+ />
24+ < CardActionArea
25+ onClick = { goToUrl }
26+ >
27+ < CardContent >
28+ < Typography color = "textSecondary" paragraph >
29+ { description }
30+ </ Typography >
31+ </ CardContent >
32+ </ CardActionArea >
33+ </ Card >
34+ ) ;
35+ } ;
2536
2637export default Application ;
You can’t perform that action at this time.
0 commit comments