Fix initialSeason being set to specials

This commit is contained in:
Prayag Prajapati committed 2024-01-13 21:55:16 +05:30
1 parent 4d5f4b95e5
commit 8f375dc645
1 file changed
+13
+13
View File
@@ -226,6 +226,19 @@ const SeriesTitlePage = () => {
}
}, [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) {
return (
<Box