From 3acac648ad6f7c220a48ff9f92f42e814c2097ab Mon Sep 17 00:00:00 2001 From: real-zephex Date: Tue, 26 Mar 2024 13:21:55 +0530 Subject: restructured files --- src/app/anime/top-airing/page.jsx | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/app/anime/top-airing/page.jsx (limited to 'src/app/anime/top-airing/page.jsx') diff --git a/src/app/anime/top-airing/page.jsx b/src/app/anime/top-airing/page.jsx new file mode 100644 index 0000000..5536870 --- /dev/null +++ b/src/app/anime/top-airing/page.jsx @@ -0,0 +1,45 @@ +import "./trending.css"; +import Image from "next/image"; +import Link from "next/link"; + +export default async function Trending() { + const data = await test(); + + return ( +
+

Trending

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

{item.title}

+
+ + ))} +
+
+ ); +} + +async function test() { + const res = await fetch( + "https://consumet-api-di2e.onrender.com/anime/gogoanime/top-airing", + { cache: "force-cache" } + ); + const data = res.json(); + return data; +} -- cgit v1.2.3