Refactor: Improves UI consistency

Refactors the code to enhance UI consistency and readability by:

- Removing unnecessary constants for poster carousel height and directly using the value.
- Corrects minor typos and improves clarity in the README regarding Live TV and Next Up features.
- Clarifies the status of TV builds in the README.
This commit is contained in:
Uruk
2026-01-26 20:53:37 +01:00
parent 9a17e36882
commit bae8161591
3 changed files with 5 additions and 14 deletions

View File

@@ -9,10 +9,6 @@ import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { TouchableOpacity, View, type ViewProps } from "react-native";
import useRouter from "@/hooks/useAppRouter";
// Matches `w-28` poster cards (approx 112px wide, 10/15 aspect ratio) + 2 lines of text.
const POSTER_CAROUSEL_HEIGHT = 220;
import { apiAtom } from "@/providers/JellyfinProvider";
import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl";
import { HorizontalScroll } from "../common/HorizontalScroll";
@@ -56,7 +52,7 @@ export const CastAndCrew: React.FC<Props> = ({ item, loading, ...props }) => {
<HorizontalScroll
loading={loading}
keyExtractor={(i, _idx) => i.Id?.toString() || ""}
height={POSTER_CAROUSEL_HEIGHT}
height={220}
data={destinctPeople}
renderItem={(i) => (
<TouchableOpacity

View File

@@ -4,10 +4,6 @@ import type React from "react";
import { useTranslation } from "react-i18next";
import { TouchableOpacity, View, type ViewProps } from "react-native";
import useRouter from "@/hooks/useAppRouter";
// Matches `w-28` poster cards (approx 112px wide, 10/15 aspect ratio) + 2 lines of text.
const POSTER_CAROUSEL_HEIGHT = 220;
import { apiAtom } from "@/providers/JellyfinProvider";
import { getPrimaryImageUrlById } from "@/utils/jellyfin/image/getPrimaryImageUrlById";
import { HorizontalScroll } from "../common/HorizontalScroll";
@@ -30,7 +26,7 @@ export const CurrentSeries: React.FC<Props> = ({ item, ...props }) => {
</Text>
<HorizontalScroll
data={[item]}
height={POSTER_CAROUSEL_HEIGHT}
height={220}
renderItem={(item, _index) => (
<TouchableOpacity
key={item?.Id}