aboutsummaryrefslogtreecommitdiff
path: root/src/app/recent/page.js
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-03-15 21:23:45 +0530
committerreal-zephex <[email protected]>2024-03-15 21:23:45 +0530
commitaabc2fa63b70079a62cb6ffb47c1542e6c73286d (patch)
treefe17c37c518ce0e6688f6b9dae3ba1468d49bcda /src/app/recent/page.js
parentminor fix: changed the website title (diff)
downloaddramalama-aabc2fa63b70079a62cb6ffb47c1542e6c73286d.tar.xz
dramalama-aabc2fa63b70079a62cb6ffb47c1542e6c73286d.zip
features: added anime and pretty much completed it. only search functionality is left to add
Diffstat (limited to 'src/app/recent/page.js')
-rw-r--r--src/app/recent/page.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/app/recent/page.js b/src/app/recent/page.js
new file mode 100644
index 0000000..f879e58
--- /dev/null
+++ b/src/app/recent/page.js
@@ -0,0 +1,40 @@
+import "./recent.css";
+import Image from "next/image";
+import Link from "next/link";
+
+export default async function Releases() {
+
+ const data = await test();
+
+ return (
+ <div className="trendingContainer">
+ <p className="trendingText">
+ Recent Releases
+ </p>
+
+ <div className="trending">
+ {data && data.results.map((item, index) => (
+ <Link href={`/info/${item.id}`} style={{textDecoration: "none"}}>
+ <div key={index} className="trendingEntries">
+ <Image
+ src={item.image}
+ className="{trendingImage}"
+ width={160}
+ height={220}
+ alt="Drama"
+ />
+ <p>
+ {item.title}
+ </p>
+ </div>
+ </Link>
+ ))}
+ </div>
+ </div>
+ )}
+
+async function test() {
+ 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