Update formating of detailed infos
This commit is contained in:
parent
04ef01995e
commit
b8e55ec498
@ -3,8 +3,12 @@ import React from 'react'
|
|||||||
export default function ListDetails(props) {
|
export default function ListDetails(props) {
|
||||||
let genres;
|
let genres;
|
||||||
if (props.data.genres) {
|
if (props.data.genres) {
|
||||||
genres = props.data.genres.join(', ');
|
// Uppercase first genres
|
||||||
|
genres = props.data.genres.map(
|
||||||
|
(word) => word[0].toUpperCase() + word.substr(1)
|
||||||
|
).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">
|
||||||
@ -25,7 +29,10 @@ export default function ListDetails(props) {
|
|||||||
}
|
}
|
||||||
<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>
|
{Number(props.data.rating).toFixed(1)}
|
||||||
|
{props.data.votes &&
|
||||||
|
<small>({props.data.votes} counts)</small>
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
<p className="plot">{props.data.plot}</p>
|
<p className="plot">{props.data.plot}</p>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user