Add genres in the detailed view
This commit is contained in:
parent
70321d2aaf
commit
f34813f3a5
@ -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) {
|
|||||||
{props.data.runtime} min
|
{props.data.runtime} min
|
||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
|
{props.data.genres &&
|
||||||
|
<p>
|
||||||
|
<i className="fa fa-tags"></i>
|
||||||
|
{genres}
|
||||||
|
</p>
|
||||||
|
}
|
||||||
<p>
|
<p>
|
||||||
<i className="fa fa-star-o"></i>
|
<i className="fa fa-star-o"></i>
|
||||||
{props.data.rating} <small>({props.data.votes} counts)</small>
|
{props.data.rating} <small>({props.data.votes} counts)</small>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user