From 1eee181e219dfd993d396ac3169e7aad3dd285eb Mon Sep 17 00:00:00 2001 From: Factiven Date: Sun, 16 Jul 2023 22:35:39 +0700 Subject: Update v3.6.4 - Added Manga page with a working tracker for AniList user - Added schedule component to home page - Added disqus comment section so you can fight on each other (not recommended) - Added /id and /en route for english and indonesian subs (id route still work in progress) --- components/manga/info/topSection.js | 106 ++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 components/manga/info/topSection.js (limited to 'components/manga/info/topSection.js') diff --git a/components/manga/info/topSection.js b/components/manga/info/topSection.js new file mode 100644 index 0000000..14dc5e5 --- /dev/null +++ b/components/manga/info/topSection.js @@ -0,0 +1,106 @@ +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 */} +
+

+

+
+
+
+
+ ); +} -- cgit v1.2.3