diff --git a/components/jellyseerr/discover/RecentRequestsSlide.tsx b/components/jellyseerr/discover/RecentRequestsSlide.tsx index fc9a5064..9a9902a6 100644 --- a/components/jellyseerr/discover/RecentRequestsSlide.tsx +++ b/components/jellyseerr/discover/RecentRequestsSlide.tsx @@ -34,7 +34,7 @@ const RequestCard: React.FC<{request: MediaRequest}> = ({request}) => { }); return ( - !isLoading && details && + details && ) } @@ -50,9 +50,7 @@ const RecentRequestsSlide: React.FC = ({ slide, ...props }); return ( - requests && - requests.results.length > 0 && - !isError && ( + requests && ( = ({ mediaRequest, ...props }) => { - const { jellyseerrApi, getTitle, getYear, getMediaType, isJellyseerrResult } = useJellyseerr(); + const { jellyseerrApi, getTitle, getYear, getMediaType } = useJellyseerr(); const loadingOpacity = useSharedValue(1); const imageOpacity = useSharedValue(0); const {t} = useTranslation(); - const loadingAnimatedStyle = useAnimatedStyle(() => ({ - opacity: loadingOpacity.value, - })); - const imageAnimatedStyle = useAnimatedStyle(() => ({ opacity: imageOpacity.value, })); @@ -51,11 +47,13 @@ const JellyseerrPoster: React.FC = ({ imageOpacity.value = withTiming(1, { duration: 300 }); }; - const imageSrc = useMemo( - () => jellyseerrApi?.imageProxy( - horizontal ? item.backdropPath : item.posterPath, - horizontal ? "w1920_and_h800_multi_faces" : "w300_and_h450_face" - ), + const backdropSrc = useMemo( + () => jellyseerrApi?.imageProxy(item.backdropPath, "w1920_and_h800_multi_faces"), + [item, jellyseerrApi, horizontal] + ); + + const posterSrc = useMemo( + () => jellyseerrApi?.imageProxy(item.posterPath, "w300_and_h450_face",), [item, jellyseerrApi, horizontal] ); @@ -116,16 +114,17 @@ const JellyseerrPoster: React.FC = ({ mediaTitle={title} releaseYear={releaseYear} canRequest={canRequest} - posterSrc={imageSrc!!} + posterSrc={posterSrc!!} mediaType={mediaType} >