import Image from "next/image"; import Link from "next/link"; import Skeleton from "react-loading-skeleton"; export default function DesktopDetails({ info, statuses, handleOpen, loading, color, setShowAll, showAll, }) { return ( <>
{info ? ( <>
poster anime ) : ( )}

{info ? ( info?.title?.romaji || info?.title?.english ) : ( )}

{info ? (
{info?.episodes && (
{info?.episodes} Episodes
)} {info?.startDate?.year && (
{info?.startDate?.year}
)} {info?.averageScore && (
{info?.averageScore}%
)} {info?.type && (
{info?.type}
)} {info?.status && (
{info?.status}
)}
Sub | EN
) : ( )}
{info ? (

) : ( )}

{info?.relations?.edges?.length > 0 && (
Relations
)} {info?.relations?.edges?.length > 3 && (
setShowAll(!showAll)} > {showAll ? "show less" : "show more"}
)}
{info?.relations?.edges ? ( info?.relations?.edges .slice(0, showAll ? info?.relations?.edges.length : 3) .map((r, index) => { const rel = r.node; return (
{rel.id}
{r.relationType}
{rel.title.userPreferred}
{rel.type}
); }) ) : ( <> {[1, 2, 3].map((item) => (
))}
)}
); }