Add genres in the detailed view

This commit is contained in:
Grégoire Delattre 2017-01-06 23:48:45 +01:00
parent 70321d2aaf
commit f34813f3a5

View File

@ -1,6 +1,10 @@
import React from 'react' import React from 'react'
export default function ListDetails(props) { export default function ListDetails(props) {
let genres;
if (props.data.genres) {
genres = props.data.genres.join(', ');
}
return ( return (
<div className="col-xs-7 col-md-4"> <div className="col-xs-7 col-md-4">
<div className="show-detail affix"> <div className="show-detail affix">
@ -12,6 +16,12 @@ export default function ListDetails(props) {
&nbsp;{props.data.runtime} min &nbsp;{props.data.runtime} min
</p> </p>
} }
{props.data.genres &&
<p>
<i className="fa fa-tags"></i>
&nbsp;{genres}
</p>
}
<p> <p>
<i className="fa fa-star-o"></i> <i className="fa fa-star-o"></i>
&nbsp;{props.data.rating} <small>({props.data.votes} counts)</small> &nbsp;{props.data.rating} <small>({props.data.votes} counts)</small>