From 5c01313cc4c8277de398124848b4481a2b0080b3 Mon Sep 17 00:00:00 2001 From: aedelbro <36162221+aedelbro@users.noreply.github.com> Date: Fri, 16 Sep 2022 17:27:45 -0400 Subject: [PATCH] fix(ui): remove 'all' badge from request cards (#2992) if all seasons are requested for a TV show, show each indivdual season badge. This prevents the admin from needing to open a second tab / navigate to see how many seasons / what seasons have been requested. --- src/components/RequestCard/index.tsx | 21 +++++++------------ .../RequestList/RequestItem/index.tsx | 21 +++++++------------ 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/components/RequestCard/index.tsx b/src/components/RequestCard/index.tsx index 18b81ac4d..0a44421d5 100644 --- a/src/components/RequestCard/index.tsx +++ b/src/components/RequestCard/index.tsx @@ -357,20 +357,13 @@ const RequestCard = ({ request, onTitleData }: RequestCardProps) => { : request.seasons.length, })} - {title.seasons.filter((season) => season.seasonNumber !== 0) - .length === request.seasons.length ? ( - - {intl.formatMessage(globalMessages.all)} - - ) : ( -
- {request.seasons.map((season) => ( - - {season.seasonNumber} - - ))} -
- )} +
+ {request.seasons.map((season) => ( + + {season.seasonNumber} + + ))} +
)}
diff --git a/src/components/RequestList/RequestItem/index.tsx b/src/components/RequestList/RequestItem/index.tsx index 7949a263c..b3ca37817 100644 --- a/src/components/RequestList/RequestItem/index.tsx +++ b/src/components/RequestList/RequestItem/index.tsx @@ -420,20 +420,13 @@ const RequestItem = ({ request, revalidateList }: RequestItemProps) => { : request.seasons.length, })} - {title.seasons.filter((season) => season.seasonNumber !== 0) - .length === request.seasons.length ? ( - - {intl.formatMessage(globalMessages.all)} - - ) : ( -
- {request.seasons.map((season) => ( - - {season.seasonNumber} - - ))} -
- )} +
+ {request.seasons.map((season) => ( + + {season.seasonNumber} + + ))} +
)}