From 12847894df3ebe151aab2dc10214111d0617fe74 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Sun, 11 Jan 2026 00:19:31 +0100 Subject: [PATCH] feat(watchlists): add see all navigation for promoted watchlists --- .../home/StreamystatsPromotedWatchlists.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/components/home/StreamystatsPromotedWatchlists.tsx b/components/home/StreamystatsPromotedWatchlists.tsx index 474b9660..81d50675 100644 --- a/components/home/StreamystatsPromotedWatchlists.tsx +++ b/components/home/StreamystatsPromotedWatchlists.tsx @@ -4,8 +4,10 @@ import type { } from "@jellyfin/sdk/lib/generated-client/models"; import { getItemsApi, getSystemApi } from "@jellyfin/sdk/lib/utils/api"; import { useQuery } from "@tanstack/react-query"; +import { useRouter } from "expo-router"; import { useAtomValue } from "jotai"; import { useMemo } from "react"; +import { useTranslation } from "react-i18next"; import { ScrollView, View, type ViewProps } from "react-native"; import { SectionHeader } from "@/components/common/SectionHeader"; import { Text } from "@/components/common/Text"; @@ -33,6 +35,8 @@ const WatchlistSection: React.FC = ({ const api = useAtomValue(apiAtom); const user = useAtomValue(userAtom); const { settings } = useSettings(); + const router = useRouter(); + const { t } = useTranslation(); const { data: items, isLoading } = useQuery({ queryKey: [ @@ -84,11 +88,23 @@ const WatchlistSection: React.FC = ({ return items?.map((_, index) => index * ITEM_WIDTH) ?? []; }, [items]); + const handleSeeAll = () => { + router.push({ + pathname: "/(auth)/(tabs)/(watchlists)/[watchlistId]", + params: { watchlistId: watchlist.id.toString() }, + } as any); + }; + if (!isLoading && (!items || items.length === 0)) return null; return ( - + {isLoading ? ( {[1, 2, 3].map((i) => (