diff options
Diffstat (limited to 'src/app/anime/components')
| -rw-r--r-- | src/app/anime/components/cacher.js | 4 | ||||
| -rw-r--r-- | src/app/anime/components/search_results.jsx | 11 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/app/anime/components/cacher.js b/src/app/anime/components/cacher.js index 164dafd..ae9b10b 100644 --- a/src/app/anime/components/cacher.js +++ b/src/app/anime/components/cacher.js @@ -1,6 +1,6 @@ "use server"; -import { anime_info } from "../data-fetch/request"; +import { anime_info, video_url } from "../data-fetch/request"; export async function preFetchAnimeInfo(data) { try { @@ -18,7 +18,7 @@ export async function preFetchAnimeInfo(data) { export async function preFetchVideoLinks(data) { try { const fetchPromises = data.map(async (element) => { - await fetch(watch_url(element.id), { next: { revalidate: 21600 } }); + await video_url(element.id); }); await Promise.all(fetchPromises); diff --git a/src/app/anime/components/search_results.jsx b/src/app/anime/components/search_results.jsx index 3097a96..2018680 100644 --- a/src/app/anime/components/search_results.jsx +++ b/src/app/anime/components/search_results.jsx @@ -2,8 +2,8 @@ import { search_results } from "../data-fetch/request"; import { preFetchAnimeInfo } from "./cacher"; import styles from "../../page.module.css"; -import { Card, CardHeader, CardBody, Image, Link } from "@nextui-org/react"; -import NextImage from "next/image"; +import { Card, CardHeader, CardBody, Link } from "@nextui-org/react"; +import Image from "next/image"; const SearchResults = async (title) => { const data = await search_results(title); @@ -25,14 +25,11 @@ const SearchResults = async (title) => { <Card className="overflow-hidden" isPressable> <CardBody> <Image - as={NextImage} - isBlurred - alt="Anime Poster" + alt="Searched Anime Poster" src={item.image} width={190} height={120} - shadow="lg" - className="h-64" + className="rounded-md h-64" priority /> </CardBody> |