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/recent/page.js | 51 ++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) (limited to 'src/app/recent') diff --git a/src/app/recent/page.js b/src/app/recent/page.js index 0cefca5..2962e0f 100644 --- a/src/app/recent/page.js +++ b/src/app/recent/page.js @@ -3,39 +3,42 @@ import Image from "next/image"; import Link from "next/link"; export default async function Releases() { - const data = await test(); return (
-

- Recent Releases -

+

Recent Releases

- {data && data.results.map((item, index) => ( - -
- Drama -

- {item.title} -

-
- - ))} + {data && + data.results.map((item, index) => ( + +
+ Drama +

{item.title}

+
+ + ))}
- )} + ); +} async function test() { - const res = await fetch("https://dramalama-api.vercel.app/anime/gogoanime/recent-episodes"); + const res = await fetch( + "https://dramalama-api.vercel.app/anime/gogoanime/recent-episodes" + ); const data = res.json(); return data; -} \ No newline at end of file +} -- cgit v1.2.3