import styles from "./trending.module.css"; import Image from "next/image"; import Link from "next/link"; import { preFetchAnimeInfo } from "../videoLinkfetcher"; export default async function Trending() { const data = await test(); preFetchAnimeInfo(data); return (

Trending

{data && data.results.map((item, index) => (
Drama

{item.title}

))}
); } async function test() { const res = await fetch( "https://consumet-jade.vercel.app/anime/gogoanime/top-airing", { next: { revalidate: 21600 } } ); const data = res.json(); return data; }