File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const MediaCard = props => {
30
30
< Typography gutterBottom variant = "h5" component = "h2" >
31
31
{ name }
32
32
</ Typography >
33
- < Typography component = "p" > { text } </ Typography >
33
+ < Typography component = "p" dangerouslySetInnerHTML = { { __html : text } } / >
34
34
</ CardContent >
35
35
< CardActions > { button } </ CardActions >
36
36
</ Card >
@@ -41,8 +41,12 @@ MediaCard.propTypes = {
41
41
classes : PropTypes . shape ( { media : PropTypes . string . isRequired } ) . isRequired ,
42
42
name : PropTypes . string . isRequired ,
43
43
image : PropTypes . string . isRequired ,
44
- text : PropTypes . string . isRequired ,
44
+ text : PropTypes . string ,
45
45
button : PropTypes . shape ( Button ) . isRequired ,
46
46
} ;
47
47
48
+ MediaCard . defaultProps = {
49
+ text : '' ,
50
+ } ;
51
+
48
52
export default withStyles ( styles ) ( MediaCard ) ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ class SpaceGrid extends Component {
81
81
const { spaces, classes, history } = this . props ;
82
82
83
83
const MediaCards = spaces . map ( space => {
84
- const { id, name, image = { } , text } = space ;
84
+ const { id, name, image = { } , description } = space ;
85
85
const { replace } = history ;
86
86
const ViewButton = (
87
87
< Button
@@ -90,6 +90,7 @@ class SpaceGrid extends Component {
90
90
color = "primary"
91
91
id = { Number ( id ) }
92
92
onClick = { ( ) => replace ( `/space/${ id } ` ) }
93
+ fullWidth
93
94
>
94
95
< RemoveRedEyeIcon className = { classes . leftIcon } />
95
96
View
@@ -101,7 +102,7 @@ class SpaceGrid extends Component {
101
102
key = { id }
102
103
name = { name }
103
104
image = { this . generateThumbnail ( { image } ) }
104
- text = { text }
105
+ text = { description }
105
106
button = { ViewButton }
106
107
/>
107
108
</ Grid >
You can’t perform that action at this time.
0 commit comments