diff --git a/components/MoreMoviesWithActor.tsx b/components/MoreMoviesWithActor.tsx index 6a8d2ca4..c3e4d0ca 100644 --- a/components/MoreMoviesWithActor.tsx +++ b/components/MoreMoviesWithActor.tsx @@ -11,11 +11,9 @@ import { Text } from "@/components/common/Text"; import { TouchableItemRouter } from "@/components/common/TouchableItemRouter"; import { ItemCardText } from "@/components/ItemCardText"; import MoviePoster from "@/components/posters/MoviePoster"; +import { POSTER_CAROUSEL_HEIGHT } from "@/constants/Values"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; -// Matches `w-28` poster cards (approx 112px wide, 10/15 aspect ratio) + 2 lines of text. -const POSTER_CAROUSEL_HEIGHT = 220; - interface Props extends ViewProps { actorId: string; actorName?: string | null; diff --git a/components/SimilarItems.tsx b/components/SimilarItems.tsx index 7ed99535..ce09cbcf 100644 --- a/components/SimilarItems.tsx +++ b/components/SimilarItems.tsx @@ -6,11 +6,8 @@ import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { View, type ViewProps } from "react-native"; import MoviePoster from "@/components/posters/MoviePoster"; +import { POSTER_CAROUSEL_HEIGHT } from "@/constants/Values"; import { apiAtom, userAtom } from "@/providers/JellyfinProvider"; - -// Matches `w-28` poster cards (approx 112px wide, 10/15 aspect ratio) + 2 lines of text. -const POSTER_CAROUSEL_HEIGHT = 220; - import { HorizontalScroll } from "./common/HorizontalScroll"; import { Text } from "./common/Text"; import { TouchableItemRouter } from "./common/TouchableItemRouter"; diff --git a/components/series/CastAndCrew.tsx b/components/series/CastAndCrew.tsx index 97114840..06bf47be 100644 --- a/components/series/CastAndCrew.tsx +++ b/components/series/CastAndCrew.tsx @@ -8,6 +8,7 @@ import type React from "react"; import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { TouchableOpacity, View, type ViewProps } from "react-native"; +import { POSTER_CAROUSEL_HEIGHT } from "@/constants/Values"; import useRouter from "@/hooks/useAppRouter"; import { apiAtom } from "@/providers/JellyfinProvider"; import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl"; @@ -52,7 +53,7 @@ export const CastAndCrew: React.FC = ({ item, loading, ...props }) => { i.Id?.toString() || ""} - height={220} + height={POSTER_CAROUSEL_HEIGHT} data={destinctPeople} renderItem={(i) => ( = ({ item, ...props }) => { (