blob: 6063dfc08843046411d77f0b3107ef0891eae9e2 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
import Image from "next/image";
import Link from "next/link";
export default function ThumbnailOnly({
info,
providerId,
episode,
artStorage,
progress,
dub,
}) {
const time = artStorage?.[episode?.id]?.time;
const duration = artStorage?.[episode?.id]?.duration;
let prog = (time / duration) * 100;
if (prog > 90) prog = 100;
return (
<Link
// key={index}
href={`/en/anime/watch/${info.id}/${providerId}?id=${encodeURIComponent(
episode.id
)}&num=${episode.number}${dub ? `&dub=${dub}` : ""}`}
className="transition-all duration-200 ease-out lg:hover:scale-105 hover:ring-1 hover:ring-white cursor-pointer bg-secondary shrink-0 relative w-full h-[180px] sm:h-[130px] subpixel-antialiased rounded-md overflow-hidden"
>
<span className="absolute text-sm z-40 bottom-1 left-2 font-karla font-semibold text-white">
Episode {episode?.number}
</span>
<span
className={`absolute bottom-7 left-0 h-1 bg-red-600`}
style={{
width:
progress && artStorage && episode?.number <= progress
? "100%"
: artStorage?.[episode?.id]
? `${prog}%`
: "0%",
}}
/>
<div className="absolute inset-0 bg-black z-30 opacity-20" />
<Image
// src={
// providerId === "animepahe"
// ? `https://img.moopa.live/image-proxy?url=${encodeURIComponent(
// episode.img
// )}&headers=${encodeURIComponent(
// JSON.stringify({ Referer: "https://animepahe.com/" })
// )}`
// : thumbnail?.img.includes("null")
// ? info.coverImage.large
// : thumbnail?.img || info.coverImage.large
// }
src={episode?.image}
alt="epi image"
width={500}
height={500}
className="object-cover w-full h-[150px] sm:h-[100px] z-20"
/>
</Link>
);
}
|