diff options
| author | real-zephex <[email protected]> | 2024-04-26 23:57:32 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-04-26 23:57:32 +0530 |
| commit | 4c74f9e66c6765f771f816ae64adaa2da66ed013 (patch) | |
| tree | 653122ca698b5a2e99e6d8839c5bd2c976d652b2 /src/app/manga | |
| parent | minor ui fix (diff) | |
| download | dramalama-4c74f9e66c6765f771f816ae64adaa2da66ed013.tar.xz dramalama-4c74f9e66c6765f771f816ae64adaa2da66ed013.zip | |
trying to implement edge runtime
Diffstat (limited to 'src/app/manga')
| -rw-r--r-- | src/app/manga/[title]/[id]/[read]/page.jsx | 2 | ||||
| -rw-r--r-- | src/app/manga/[title]/[id]/page.jsx | 4 | ||||
| -rw-r--r-- | src/app/manga/[title]/page.jsx | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/app/manga/[title]/[id]/[read]/page.jsx b/src/app/manga/[title]/[id]/[read]/page.jsx index 01080bf..f1e777d 100644 --- a/src/app/manga/[title]/[id]/[read]/page.jsx +++ b/src/app/manga/[title]/[id]/[read]/page.jsx @@ -2,6 +2,8 @@ import styles from "./read.module.css"; import Image from "next/image";
import DownloadManga from "./download";
+export const runtime = "edge";
+
export default async function Read({ params }) {
const chapterId = params.read;
const results = await getPages(chapterId);
diff --git a/src/app/manga/[title]/[id]/page.jsx b/src/app/manga/[title]/[id]/page.jsx index ffd962d..2c1fcc8 100644 --- a/src/app/manga/[title]/[id]/page.jsx +++ b/src/app/manga/[title]/[id]/page.jsx @@ -5,6 +5,8 @@ import { redirect } from "next/navigation"; import { FaStar } from "react-icons/fa";
import { PreFetchChaterLinks } from "../../cacher";
+export const runtime = 'edge';
+
export default async function MangaInfo({ params }) {
const id = params.id;
const data = await getMangaInfo(id);
@@ -129,7 +131,7 @@ export default async function MangaInfo({ params }) { async function getMangaInfo(id) {
const res = await fetch(
`https://consumet-jade.vercel.app/meta/anilist-manga/info/${id}?provider=mangadex`,
- { next: { revalidate: 86400 } }
+ { next: { revalidate: 21600 } }
);
const data = await res.json();
return data;
diff --git a/src/app/manga/[title]/page.jsx b/src/app/manga/[title]/page.jsx index 4446d05..fd406ac 100644 --- a/src/app/manga/[title]/page.jsx +++ b/src/app/manga/[title]/page.jsx @@ -3,7 +3,7 @@ import Image from "next/image"; import Link from "next/link";
import { PreFetchMangaInfo } from "../cacher";
-// This page displays all the available mangas or manhwas when the user searches for one/
+export const runtime = 'edge';
export default async function MangaInfo({ params }) {
const title = params.title;
|