fix(frontend): dont show runtime if there is no runtime data

pull/97/head
sct 4 years ago
parent de84658b48
commit e0c39aeca1

@ -143,11 +143,16 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
</span> </span>
<h1 className="text-2xl md:text-4xl">{data.title}</h1> <h1 className="text-2xl md:text-4xl">{data.title}</h1>
<span className="text-xs md:text-base mt-1 md:mt-0"> <span className="text-xs md:text-base mt-1 md:mt-0">
<FormattedMessage {(data.runtime ?? 0) > 0 && (
{...messages.runtime} <>
values={{ minutes: data.runtime }} <FormattedMessage
/>{' '} {...messages.runtime}
| {data.genres.map((g) => g.name).join(', ')} values={{ minutes: data.runtime }}
/>{' '}
|{' '}
</>
)}
{data.genres.map((g) => g.name).join(', ')}
</span> </span>
</div> </div>
<div className="flex-1 flex justify-end mt-4 md:mt-0"> <div className="flex-1 flex justify-end mt-4 md:mt-0">

Loading…
Cancel
Save