From 4d92a059d19bc9651093ab4cd7e9db2548c8a64c Mon Sep 17 00:00:00 2001 From: prayag17 Date: Sat, 29 Apr 2023 15:42:17 +0530 Subject: [PATCH] Fix nextup --- src/routes/item/index.jsx | 170 +++++++++++++++++++++----------------- 1 file changed, 92 insertions(+), 78 deletions(-) diff --git a/src/routes/item/index.jsx b/src/routes/item/index.jsx index fd552d7..a46cdbb 100644 --- a/src/routes/item/index.jsx +++ b/src/routes/item/index.jsx @@ -175,7 +175,7 @@ const ItemDetail = () => { }); const nextUpEpisode = useQuery({ - queryKey: ["item", "seasons", id, "nextUp"], + queryKey: ["item", id, "nextUp"], queryFn: async () => { const result = await getTvShowsApi(window.api).getNextUp({ userId: user.data.Id, @@ -2107,85 +2107,86 @@ const ItemDetail = () => { )} - {nextUpEpisode.isSuccess && ( - - - Next Up - - - {nextUpEpisode.data.Items.map( - (mitem, mindex) => { - return ( - - + + Next Up + + + {nextUpEpisode.data.Items.map( + (mitem, mindex) => { + return ( + + - - ); - }, - )} - - - )} + } + currentUser={ + user.data + } + centerAlignText + /> + + ); + }, + )} + + + )} {seasons.isSuccess && ( @@ -2197,6 +2198,19 @@ const ItemDetail = () => { > Episodes + + ) : ( + episodes.data + .TotalRecordCount + ) + } + sx={{ ml: 2 }} + />