import Skeleton from "react-loading-skeleton";
import Image from "next/image";
import Link from "next/link";
export default function SecondarySide({
info,
map,
providerId,
watchId,
episode,
artStorage,
dub,
}) {
const progress = info.mediaListEntry?.progress;
return (
Up Next
{episode && episode.length > 0 ? (
map?.some((item) => item.title && item.description) > 0 ? (
episode.map((item) => {
const time = artStorage?.[item.id]?.timeWatched;
const duration = artStorage?.[item.id]?.duration;
let prog = (time / duration) * 100;
if (prog > 90) prog = 100;
const mapData = map?.find((i) => i.number === item.number);
return (
{/* {mapData?.image && ( */}
{/* )} */}
Episode {item?.number}
{item.id == watchId && (
)}
{mapData?.title}
{mapData?.description}
);
})
) : (
episode.map((item) => {
return (
Episode {item.number}
);
})
)
) : (
<>
{[1].map((item) => (
))}
>
)}
);
}