mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(frontend): try not to render broken rottentomatoes data
This commit is contained in:
@@ -397,7 +397,8 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
|||||||
<div className="bg-gray-900 rounded-lg shadow border border-gray-800">
|
<div className="bg-gray-900 rounded-lg shadow border border-gray-800">
|
||||||
{(data.voteCount > 0 || ratingData) && (
|
{(data.voteCount > 0 || ratingData) && (
|
||||||
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0 items-center justify-center">
|
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0 items-center justify-center">
|
||||||
{ratingData?.criticsRating && (
|
{ratingData?.criticsRating &&
|
||||||
|
(ratingData?.criticsScore ?? 0) > 0 && (
|
||||||
<>
|
<>
|
||||||
<span className="text-sm">
|
<span className="text-sm">
|
||||||
{ratingData.criticsRating === 'Rotten' ? (
|
{ratingData.criticsRating === 'Rotten' ? (
|
||||||
@@ -411,7 +412,8 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
|
|||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{ratingData?.audienceRating && (
|
{ratingData?.audienceRating &&
|
||||||
|
(ratingData?.audienceScore ?? 0) > 0 && (
|
||||||
<>
|
<>
|
||||||
<span className="text-sm">
|
<span className="text-sm">
|
||||||
{ratingData.audienceRating === 'Spilled' ? (
|
{ratingData.audienceRating === 'Spilled' ? (
|
||||||
|
@@ -406,7 +406,8 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
<div className="bg-gray-900 rounded-lg shadow border border-gray-800">
|
<div className="bg-gray-900 rounded-lg shadow border border-gray-800">
|
||||||
{(data.voteCount > 0 || ratingData) && (
|
{(data.voteCount > 0 || ratingData) && (
|
||||||
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0 items-center justify-center">
|
<div className="flex px-4 py-2 border-b border-gray-800 last:border-b-0 items-center justify-center">
|
||||||
{ratingData?.criticsRating && (
|
{ratingData?.criticsRating &&
|
||||||
|
(ratingData?.criticsScore ?? 0) > 0 && (
|
||||||
<>
|
<>
|
||||||
<span className="text-sm">
|
<span className="text-sm">
|
||||||
{ratingData.criticsRating === 'Rotten' ? (
|
{ratingData.criticsRating === 'Rotten' ? (
|
||||||
@@ -420,7 +421,8 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
|
|||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{ratingData?.audienceRating && (
|
{ratingData?.audienceRating &&
|
||||||
|
(ratingData?.audienceScore ?? 0) > 0 && (
|
||||||
<>
|
<>
|
||||||
<span className="text-sm">
|
<span className="text-sm">
|
||||||
{ratingData.audienceRating === 'Spilled' ? (
|
{ratingData.audienceRating === 'Spilled' ? (
|
||||||
|
Reference in New Issue
Block a user