aboutsummaryrefslogtreecommitdiff
path: root/src/app/anime
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/anime')
-rw-r--r--src/app/anime/[id]/page.jsx5
-rw-r--r--src/app/anime/components/search_results.jsx5
-rw-r--r--src/app/anime/loading.jsx15
3 files changed, 23 insertions, 2 deletions
diff --git a/src/app/anime/[id]/page.jsx b/src/app/anime/[id]/page.jsx
index 4263005..b121400 100644
--- a/src/app/anime/[id]/page.jsx
+++ b/src/app/anime/[id]/page.jsx
@@ -9,7 +9,10 @@ const AnimeInfoHomepage = async ({ params }) => {
const id = params.id;
const data = await anime_info(id);
- preFetchVideoLinks(data.episodes);
+ if (data.episodes.length > 50) {
+ } else {
+ preFetchVideoLinks(data.episodes);
+ }
return (
<section
diff --git a/src/app/anime/components/search_results.jsx b/src/app/anime/components/search_results.jsx
index 2018680..691b276 100644
--- a/src/app/anime/components/search_results.jsx
+++ b/src/app/anime/components/search_results.jsx
@@ -1,8 +1,11 @@
+"use server";
+
import { search_results } from "../data-fetch/request";
import { preFetchAnimeInfo } from "./cacher";
import styles from "../../page.module.css";
-import { Card, CardHeader, CardBody, Link } from "@nextui-org/react";
+import { Card, CardHeader, CardBody } from "@nextui-org/react";
+import Link from "next/link";
import Image from "next/image";
const SearchResults = async (title) => {
diff --git a/src/app/anime/loading.jsx b/src/app/anime/loading.jsx
new file mode 100644
index 0000000..1ebf039
--- /dev/null
+++ b/src/app/anime/loading.jsx
@@ -0,0 +1,15 @@
+import { CircularProgress } from "@nextui-org/react";
+
+const LoadingScreen = async () => {
+ return (
+ <div className="w-screen h-screen flex gap-4 items-center justify-center">
+ <CircularProgress
+ color="success"
+ aria-label="Loading..."
+ label="Loading Animes..."
+ />
+ </div>
+ );
+};
+
+export default LoadingScreen;