From 19a2553730af968070e9ce3ff1a73a884e85ed7f Mon Sep 17 00:00:00 2001 From: Wouter De Schuyter Date: Wed, 5 Jul 2023 14:51:44 +0200 Subject: [PATCH] revert: revert hasTVPreferredFocus for first swimlane --- src/components/Swimlane/TrendingToday/Item/index.tsx | 4 +++- src/components/Swimlane/TrendingToday/index.tsx | 11 +++++++++-- src/screens/Discover/index.tsx | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/Swimlane/TrendingToday/Item/index.tsx b/src/components/Swimlane/TrendingToday/Item/index.tsx index cc165bf..c42b169 100644 --- a/src/components/Swimlane/TrendingToday/Item/index.tsx +++ b/src/components/Swimlane/TrendingToday/Item/index.tsx @@ -13,9 +13,10 @@ import styles from './styles'; interface Props { type: 'movie' | 'show' | null; id: number | null; + hasTVPreferredFocus?: boolean; } -const TrendingTodayItem = ({ id, type }: Props) => { +const TrendingTodayItem = ({ id, type, hasTVPreferredFocus }: Props) => { const { navigate } = useNavigation>(); const show = useShow(type === 'show' ? id : null); const movie = useMovie(type === 'movie' ? id : null); @@ -28,6 +29,7 @@ const TrendingTodayItem = ({ id, type }: Props) => { return ( navigate(Route.TrendingToday, { id: item.id, diff --git a/src/components/Swimlane/TrendingToday/index.tsx b/src/components/Swimlane/TrendingToday/index.tsx index 1a98c24..8a1fc08 100644 --- a/src/components/Swimlane/TrendingToday/index.tsx +++ b/src/components/Swimlane/TrendingToday/index.tsx @@ -7,9 +7,10 @@ import styles from './styles'; interface Props { hideTitle?: boolean; + hasTVPreferredFocus?: boolean; } -const TrendingTodaySwimlane = ({ hideTitle }: Props) => { +const TrendingTodaySwimlane = ({ hideTitle, hasTVPreferredFocus }: Props) => { const { data, isLoading, isEmpty, hasError } = useTrendingToday({ fetch: true, }); @@ -39,7 +40,13 @@ const TrendingTodaySwimlane = ({ hideTitle }: Props) => { item ? `${item?.type}:${item?.id}` : `index-${index}` }` } - renderItem={({ item }) => } + renderItem={({ item, index }) => ( + + )} /> diff --git a/src/screens/Discover/index.tsx b/src/screens/Discover/index.tsx index 0e0aa84..e1e660b 100644 --- a/src/screens/Discover/index.tsx +++ b/src/screens/Discover/index.tsx @@ -13,7 +13,7 @@ const DiscoverScreen = () => { return ( - +