fix(frontend): fixed similar/recommendations showing when empty (#180)

pull/167/head
Brandon Cohen 4 years ago committed by GitHub
parent 1694f60e8a
commit a3ca9b40c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -491,6 +491,8 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
/>
))}
/>
{(recommended?.results ?? []).length > 0 && (
<>
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
<div className="flex-1 min-w-0">
<Link
@ -537,6 +539,10 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
/>
))}
/>
</>
)}
{(similar?.results ?? []).length > 0 && (
<>
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
<div className="flex-1 min-w-0">
<Link
@ -583,6 +589,8 @@ const MovieDetails: React.FC<MovieDetailsProps> = ({ movie }) => {
/>
))}
/>
</>
)}
<div className="pb-8" />
</div>
);

@ -440,6 +440,8 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
/>
))}
/>
{(recommended?.results ?? []).length > 0 && (
<>
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
<div className="flex-1 min-w-0">
<Link
@ -486,6 +488,10 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
/>
))}
/>
</>
)}
{(similar?.results ?? []).length > 0 && (
<>
<div className="md:flex md:items-center md:justify-between mb-4 mt-6">
<div className="flex-1 min-w-0">
<Link href="/tv/[tvId]/similar" as={`/tv/${data.id}/similar`}>
@ -529,6 +535,8 @@ const TvDetails: React.FC<TvDetailsProps> = ({ tv }) => {
/>
))}
/>
</>
)}
<div className="pb-8" />
</div>
);

Loading…
Cancel
Save