diff --git a/src/screens/ShowRatingsScreen.tsx b/src/screens/ShowRatingsScreen.tsx index 3da3cc9..07f82a7 100644 --- a/src/screens/ShowRatingsScreen.tsx +++ b/src/screens/ShowRatingsScreen.tsx @@ -165,27 +165,53 @@ const RatingSourceToggle = memo(({ ratingSource, setRatingSource, theme }: { )); -const ShowInfo = memo(({ show, theme }: { show: Show | null, theme: any }) => ( - - - - {show?.name} - - {show?.first_air_date ? `${new Date(show.first_air_date).getFullYear()} - ${show.last_air_date ? new Date(show.last_air_date).getFullYear() : 'Present'}` : ''} - - - - - {show?.number_of_seasons} Seasons • {show?.number_of_episodes} Episodes +const ShowInfo = memo(({ show, theme }: { show: Show | null, theme: any }) => { + // singular / plural logic + const seasonLabel = + show?.number_of_seasons === 1 + ? "Season" + : "Seasons"; + + const episodeLabel = + show?.number_of_episodes === 1 + ? "Episode" + : "Episodes"; + + return ( + + + + + + {show?.name} + + + {show?.first_air_date + ? `${new Date(show.first_air_date).getFullYear()} - ${ + show.last_air_date + ? new Date(show.last_air_date).getFullYear() + : "Present" + }` + : ""} + + + + + + + {show?.number_of_seasons} {seasonLabel} •{" "} + {show?.number_of_episodes} {episodeLabel} + + - -)); + ); +}); const ShowRatingsScreen = ({ route }: Props) => { const { currentTheme } = useTheme(); @@ -455,7 +481,7 @@ const ShowRatingsScreen = ({ route }: Props) => { {/* Fixed Episode Column */} - Episode + EPs {Array.from({ length: Math.max(...seasons.map(s => s.episodes.length)) }).map((_, episodeIndex) => ( @@ -799,4 +825,4 @@ const styles = StyleSheet.create({ export default memo(ShowRatingsScreen, (prevProps, nextProps) => { return prevProps.route.params.showId === nextProps.route.params.showId; -}); \ No newline at end of file +});