From beb832a7ec205c7975d1c62eab48630a2313dbcf Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Sun, 17 Mar 2024 20:28:47 -0400 Subject: [PATCH] Sticking with the og --- src/pages/TopFlix.tsx | 21 ++++++++++++++++----- src/stores/banner/BannerLocation.tsx | 4 ++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/pages/TopFlix.tsx b/src/pages/TopFlix.tsx index d0d03e4e..9315093a 100644 --- a/src/pages/TopFlix.tsx +++ b/src/pages/TopFlix.tsx @@ -57,6 +57,7 @@ function directLinkToContent(tmdbFullId: string) { function ConfigValue(props: { name: string; + type: string; id: string; children?: ReactNode; }) { @@ -75,6 +76,9 @@ function ConfigValue(props: {

{props.children}

+

+ {props.type.charAt(0).toUpperCase() + props.type.slice(1)} +

); @@ -176,7 +180,11 @@ export function TopFlix() { const sortedItems = recentPlayedItems.sort((a, b) => b.count - a.count); const startIndex = (currentPage - 1) * itemsPerPage; const endIndex = startIndex + itemsPerPage; - return sortedItems.slice(startIndex, endIndex); + + return sortedItems.slice(startIndex, endIndex).map((item, index) => ({ + ...item, + rank: startIndex + index + 1, + })); } if (loading) { @@ -207,12 +215,15 @@ export function TopFlix() { return ( - {`${item.providerId}, ${isShowOrMovie( - item.tmdbFullId, - )} - Views: `} + {`${ + item.providerId.charAt(0).toUpperCase() + + item.providerId.slice(1) + }`}{" "} + - {`Views: `} {item.count} ); @@ -230,7 +241,7 @@ export function TopFlix() { Previous page
- {currentPage} / {maxPageCount} + {currentPage}/{maxPageCount}