blob: f879e58685a858017e54e82e68661a1f25b0113c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import "./recent.css";
import Image from "next/image";
import Link from "next/link";
export default async function Releases() {
const data = await test();
return (
<div className="trendingContainer">
<p className="trendingText">
Recent Releases
</p>
<div className="trending">
{data && data.results.map((item, index) => (
<Link href={`/info/${item.id}`} style={{textDecoration: "none"}}>
<div key={index} className="trendingEntries">
<Image
src={item.image}
className="{trendingImage}"
width={160}
height={220}
alt="Drama"
/>
<p>
{item.title}
</p>
</div>
</Link>
))}
</div>
</div>
)}
async function test() {
const res = await fetch("https://dramalama-api.vercel.app/anime/gogoanime/recent-episodes");
const data = res.json();
return data;
}
|