aboutsummaryrefslogtreecommitdiff
path: root/src/app/anime/recent/page.jsx
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-03-31 17:32:48 +0530
committerreal-zephex <[email protected]>2024-03-31 17:32:48 +0530
commitd23e1274303c54b3d7fc8de77eea37bb8fdaeaa3 (patch)
treef91c136407e3a41d115750e9ae895727c5ddf9cc /src/app/anime/recent/page.jsx
parentfix: looks like image proxy is must for viewing manga pages. we will have to... (diff)
downloaddramalama-d23e1274303c54b3d7fc8de77eea37bb8fdaeaa3.tar.xz
dramalama-d23e1274303c54b3d7fc8de77eea37bb8fdaeaa3.zip
fixes: minor css modifications, added basic information about the last read manga chapter (don't expect much out of it)
Diffstat (limited to 'src/app/anime/recent/page.jsx')
-rw-r--r--src/app/anime/recent/page.jsx19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/app/anime/recent/page.jsx b/src/app/anime/recent/page.jsx
index ddfbc3f..9094ead 100644
--- a/src/app/anime/recent/page.jsx
+++ b/src/app/anime/recent/page.jsx
@@ -1,11 +1,10 @@
-import "./recent.css";
import Image from "next/image";
import Link from "next/link";
import styles from "./recent.module.css";
import { MdRecentActors } from "react-icons/md";
export default async function Releases() {
- const data = await test();
+ const data = await fetchRecentEpisodes();
return (
<div className="trendingContainer">
@@ -16,20 +15,20 @@ export default async function Releases() {
</span>
</div>
- <div className="trending">
+ <div className={styles.Recent}>
{data &&
data.results.map((item, index) => (
<Link
key={index}
href={`/anime/${item.id}`}
- style={{ textDecoration: "none" }}
+ style={{ textDecoration: "none", color: "white" }}
>
- <div className="trendingEntries">
+ <div className={styles.RecentEntries}>
<Image
src={item.image}
- className="{trendingImage}"
- width={160}
- height={220}
+ className={styles.RecentImage}
+ width={180}
+ height={260}
alt="Drama"
priority
/>
@@ -42,10 +41,10 @@ export default async function Releases() {
);
}
-async function test() {
+async function fetchRecentEpisodes() {
const res = await fetch(
"https://consumet-api-di2e.onrender.com/anime/gogoanime/recent-episodes",
- { cache: "force-cache" }
+ { next: { revalidate: 86400 } }
);
const data = res.json();
return data;