Fix nextup
This commit is contained in:
1 file changed
+16
-2
@@ -175,7 +175,7 @@ const ItemDetail = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const nextUpEpisode = useQuery({
|
const nextUpEpisode = useQuery({
|
||||||
queryKey: ["item", "seasons", id, "nextUp"],
|
queryKey: ["item", id, "nextUp"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const result = await getTvShowsApi(window.api).getNextUp({
|
const result = await getTvShowsApi(window.api).getNextUp({
|
||||||
userId: user.data.Id,
|
userId: user.data.Id,
|
||||||
@@ -2107,7 +2107,8 @@ const ItemDetail = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{nextUpEpisode.isSuccess && (
|
{nextUpEpisode.isSuccess &&
|
||||||
|
nextUpEpisode.data.TotalRecordCount != 0 && (
|
||||||
<Box mt={0}>
|
<Box mt={0}>
|
||||||
<Typography variant="h5" mb={1}>
|
<Typography variant="h5" mb={1}>
|
||||||
Next Up
|
Next Up
|
||||||
@@ -2197,6 +2198,19 @@ const ItemDetail = () => {
|
|||||||
>
|
>
|
||||||
<Typography variant="h5">
|
<Typography variant="h5">
|
||||||
Episodes
|
Episodes
|
||||||
|
<Chip
|
||||||
|
label={
|
||||||
|
episodes.isLoading ? (
|
||||||
|
<CircularProgress
|
||||||
|
sx={{ p: 1.5 }}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
episodes.data
|
||||||
|
.TotalRecordCount
|
||||||
|
)
|
||||||
|
}
|
||||||
|
sx={{ ml: 2 }}
|
||||||
|
/>
|
||||||
</Typography>
|
</Typography>
|
||||||
<TextField
|
<TextField
|
||||||
value={currentSeason}
|
value={currentSeason}
|
||||||
|
|||||||
Reference in new issue
Block a user