diff options
| author | real-zephex <[email protected]> | 2024-03-18 14:03:32 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-03-18 14:03:32 +0530 |
| commit | b1f4f412059760d85f531c3d6e2ee626c9002d28 (patch) | |
| tree | dbbb23233b9388170d52fb67de6c5f48a16c30d7 /src/app/recent/page.jsx | |
| parent | fixed a minor bug (diff) | |
| download | dramalama-b1f4f412059760d85f531c3d6e2ee626c9002d28.tar.xz dramalama-b1f4f412059760d85f531c3d6e2ee626c9002d28.zip | |
fixes: change the file extension to .jsx and fixed the video player sizes for tablets
Diffstat (limited to 'src/app/recent/page.jsx')
| -rw-r--r-- | src/app/recent/page.jsx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/app/recent/page.jsx b/src/app/recent/page.jsx new file mode 100644 index 0000000..2962e0f --- /dev/null +++ b/src/app/recent/page.jsx @@ -0,0 +1,44 @@ +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 + key={index} + href={`/info/${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://dramalama-api.vercel.app/anime/gogoanime/recent-episodes" + ); + const data = res.json(); + return data; +} |