From bc2963f9e76a4000e3f1747b6fa4affdebba3956 Mon Sep 17 00:00:00 2001 From: real-zephex Date: Sun, 17 Mar 2024 07:08:55 +0530 Subject: prettified the code :) --- src/app/info/[id]/page.js | 26 +++++++++++++------------- src/app/info/buttons.js | 9 +++------ src/app/info/page.js | 8 ++++---- 3 files changed, 20 insertions(+), 23 deletions(-) (limited to 'src/app/info') diff --git a/src/app/info/[id]/page.js b/src/app/info/[id]/page.js index 9d37819..e49443f 100644 --- a/src/app/info/[id]/page.js +++ b/src/app/info/[id]/page.js @@ -1,8 +1,8 @@ -import "../info.css" +import "../info.css"; import Image from "next/image"; import CreateButton from "../buttons"; -export default async function AnimeInfo({params}) { +export default async function AnimeInfo({ params }) { let animeID = params.id; const info = await getAnimeInfo(animeID); @@ -14,32 +14,32 @@ export default async function AnimeInfo({params}) {

{info.title}

- Drama
-

- {info.description} -

+

{info.description}

)}
- {info && info.episodes.map((item, index) => ( - - ))} + {info && + info.episodes.map((item, index) => ( + + ))}
- - ) + ); } async function getAnimeInfo(anime_id) { - const res = await fetch("https://anime-sensei-api.vercel.app/anime/gogoanime/info/" + anime_id); + const res = await fetch( + "https://anime-sensei-api.vercel.app/anime/gogoanime/info/" + anime_id + ); const data = res.json(); return data; -} \ No newline at end of file +} diff --git a/src/app/info/buttons.js b/src/app/info/buttons.js index 8f041a8..6244a2e 100644 --- a/src/app/info/buttons.js +++ b/src/app/info/buttons.js @@ -1,13 +1,10 @@ -"use client" +"use client"; import Link from "next/link"; export default function CreateButton({ a }) { - return ( - + ); -} \ No newline at end of file +} diff --git a/src/app/info/page.js b/src/app/info/page.js index 1468652..9004ade 100644 --- a/src/app/info/page.js +++ b/src/app/info/page.js @@ -1,11 +1,11 @@ -import './info.css' +import "./info.css"; export default function Info() { return ( -
+

This is the anime info page. This page will display information about the queried anime when anime id is passed along the url.

- ) -} \ No newline at end of file + ); +} -- cgit v1.2.3