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) {
|
||||
let 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 (
|
||||
<div className="col-xs-7 col-md-4">
|
||||
<div className="show-detail affix">
|
||||
@ -25,7 +29,10 @@ export default function ListDetails(props) {
|
||||
}
|
||||
<p>
|
||||
<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 className="plot">{props.data.plot}</p>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user