fix: item page for item not associated with movie/tv-show not loading

This commit is contained in:
Fredrik Burmester
2024-08-29 23:03:51 +02:00
parent 8b3b492f5e
commit 8c0e7f7db8

View File

@@ -102,7 +102,7 @@ export const ItemContent: React.FC<{ id: string }> = React.memo(({ id }) => {
});
};
const headerHeightRef = useRef(0);
const headerHeightRef = useRef(400);
const {
data: item,
@@ -166,6 +166,7 @@ export const ItemContent: React.FC<{ id: string }> = React.memo(({ id }) => {
}
if (item?.Type === "Episode") headerHeightRef.current = 400;
else if (item?.Type === "Movie") headerHeightRef.current = 500;
else headerHeightRef.current = 400;
}, [item]);
const { data: sessionData } = useQuery({