From 3acac648ad6f7c220a48ff9f92f42e814c2097ab Mon Sep 17 00:00:00 2001
From: real-zephex <zephex-1@outlook.com>
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 (
+		<div className="trendingContainer">
+			<p className="trendingText">Trending</p>
+
+			<div className="trending">
+				{data &&
+					data.results.map((item, index) => (
+						<Link
+							key={index}
+							href={`/anime/${item.id}`}
+							style={{ textDecoration: "none" }}
+						>
+							<div className="trendingEntries">
+								<Image
+									src={item.image}
+									className="{trendingImage}"
+									width={160}
+									height={220}
+									alt="Drama"
+									priority
+								/>
+								<p>{item.title}</p>
+							</div>
+						</Link>
+					))}
+			</div>
+		</div>
+	);
+}
+
+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

