Fix nextup

This commit is contained in:
prayag17 committed 2023-04-29 15:42:17 +05:30
1 parent 5c41bfeca1
commit 4d92a059d1
1 file changed
+16 -2
+16 -2
View File
@@ -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,7 +2107,8 @@ const ItemDetail = () => {
</Box>
)}
{nextUpEpisode.isSuccess && (
{nextUpEpisode.isSuccess &&
nextUpEpisode.data.TotalRecordCount != 0 && (
<Box mt={0}>
<Typography variant="h5" mb={1}>
Next Up
@@ -2197,6 +2198,19 @@ const ItemDetail = () => {
>
<Typography variant="h5">
Episodes
<Chip
label={
episodes.isLoading ? (
<CircularProgress
sx={{ p: 1.5 }}
/>
) : (
episodes.data
.TotalRecordCount
)
}
sx={{ ml: 2 }}
/>
</Typography>
<TextField
value={currentSeason}