import Image from "next/image"; import { BookOpenIcon } from "@heroicons/react/24/outline"; import AniList from "../../media/aniList"; import Link from "next/link"; import TopMobile from "./mobile/topMobile"; import MobileButton from "./mobile/mobileButton"; export default function TopSection({ info, firstEp, setCookie }) { const slicedGenre = info.genres?.slice(0, 3); function saveManga() { localStorage.setItem( "manga", JSON.stringify({ manga: firstEp, data: info }) ); setCookie(null, "manga", info.id, { maxAge: 24 * 60 * 60, path: "/", }); } return (
cover image

{info.title?.romaji || info.title?.english || info.title?.native}

{slicedGenre && slicedGenre.map((genre, index) => { return (
{genre} {index < slicedGenre?.length - 1 && ( )}
); })}
{/* Description */}

); }