From a3ca9b40c552e6cc5effc2f57f7562ff6f723e42 Mon Sep 17 00:00:00 2001 From: Brandon Cohen Date: Wed, 18 Nov 2020 23:18:29 -0500 Subject: [PATCH] fix(frontend): fixed similar/recommendations showing when empty (#180) --- src/components/MovieDetails/index.tsx | 184 ++++++++++++++------------ src/components/TvDetails/index.tsx | 180 +++++++++++++------------ 2 files changed, 190 insertions(+), 174 deletions(-) diff --git a/src/components/MovieDetails/index.tsx b/src/components/MovieDetails/index.tsx index c7957d554..f4b19d00a 100644 --- a/src/components/MovieDetails/index.tsx +++ b/src/components/MovieDetails/index.tsx @@ -491,98 +491,106 @@ const MovieDetails: React.FC = ({ movie }) => { /> ))} /> -
-
- - - - - - 0 && ( + <> +
+ -
- ( - + + + + + + + + +
+
+ ( + + ))} /> - ))} - /> -
- +
+ ( + + ))} /> - ))} - /> + + )}
); diff --git a/src/components/TvDetails/index.tsx b/src/components/TvDetails/index.tsx index 11dfde4b2..70afd95ad 100644 --- a/src/components/TvDetails/index.tsx +++ b/src/components/TvDetails/index.tsx @@ -440,95 +440,103 @@ const TvDetails: React.FC = ({ tv }) => { /> ))} /> -
-
- - - - - - 0 && ( + <> + - ( - + + + + + + + + +
+
+ ( + + ))} /> - ))} - /> -
- -
- ( - + )} + {(similar?.results ?? []).length > 0 && ( + <> +
+ +
+ ( + + ))} /> - ))} - /> + + )}
);