Fix few things

This commit is contained in:
Prayag Prajapati committed 2023-09-19 18:44:45 +05:30
1 parent f549d6430f
commit 59e8ceb99c
11 files changed
+38 -113

No files matched your search

+6 -1
View File
@@ -1,5 +1,5 @@
/** @format */
import { useState, useEffect } from "react";
import { useState, useEffect, useRef } from "react";
import PropTypes from "prop-types";
import Box from "@mui/material/Box";
@@ -139,6 +139,7 @@ const ItemDetail = () => {
result = await getLibraryApi(window.api).getSimilarMovies({
userId: user.data.Id,
itemId: item.data.Id,
limit: 16,
});
} else if (item.data.Type == "Series") {
result = await getLibraryApi(window.api).getSimilarShows({
@@ -566,6 +567,8 @@ const ItemDetail = () => {
}
}, [item.isSuccess]);
const backdropRef = useRef(null);
if (item.isLoading || similarItems.isLoading) {
return (
<Box
@@ -591,6 +594,7 @@ const ItemDetail = () => {
flexDirection: "column",
gap: "0.5em",
}}
ref={backdropRef}
>
<Hero
item={item.data}
@@ -601,6 +605,7 @@ const ItemDetail = () => {
videoTracks={videoTracks}
audioTracks={audioTracks}
subtitleTracks={subtitleTracks}
backdropRef={backdropRef}
/>
{item.data.People.length > 0 && (
<CardScroller