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

- Trending -

+

Trending

- {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/top-airing"); + const res = await fetch( + "https://dramalama-api.vercel.app/anime/gogoanime/top-airing" + ); const data = res.json(); return data; -} \ No newline at end of file +} -- cgit v1.2.3