Fix initialSeason being set to specials
This commit is contained in:
1 file changed
+13
@@ -226,6 +226,19 @@ const SeriesTitlePage = () => {
|
|||||||
}
|
}
|
||||||
}, [item.isSuccess]);
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
if (seasons.isSuccess) {
|
||||||
|
if (
|
||||||
|
seasons.data.TotalRecordCount > 1 &&
|
||||||
|
seasons.data.Items[0].Name.toLowerCase().includes("special")
|
||||||
|
) {
|
||||||
|
setCurrentSeason(1);
|
||||||
|
} else {
|
||||||
|
setCurrentSeason(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [seasons.isSuccess]);
|
||||||
|
|
||||||
if (item.isPending || similarItems.isPending) {
|
if (item.isPending || similarItems.isPending) {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
Reference in new issue
Block a user