aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-03-29 21:23:17 +0530
committerreal-zephex <[email protected]>2024-03-29 21:23:17 +0530
commit592a906f8661ac2c7c2f86d42b6bc2eb72bfc791 (patch)
tree8761860d1b49a7f04cfd698d872882da44ae0390 /src
parentfix: minor css fix for light mode users (diff)
downloaddramalama-592a906f8661ac2c7c2f86d42b6bc2eb72bfc791.tar.xz
dramalama-592a906f8661ac2c7c2f86d42b6bc2eb72bfc791.zip
fix: mini mini mini fix
Diffstat (limited to 'src')
-rw-r--r--src/app/anime/search/components/fetchedInfo.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/app/anime/search/components/fetchedInfo.js b/src/app/anime/search/components/fetchedInfo.js
new file mode 100644
index 0000000..17c9673
--- /dev/null
+++ b/src/app/anime/search/components/fetchedInfo.js
@@ -0,0 +1,44 @@
+import "../search.css";
+import Link from "next/link";
+import Image from "next/image";
+
+export default async function fetchedInfo(data) {
+ return (
+ <div className="animeEntry">
+ {data ? (
+ data.results && data.results.length > 0 ? (
+ data.results.map((item, index) => (
+ <Link
+ key={index}
+ href={`/anime/${item.id}`}
+ style={{ textDecoration: "none" }}
+ >
+ <div className="anime">
+ <p>{item.title}</p>
+ <Image
+ src={item.image}
+ className="animeImage"
+ width={120}
+ height={160}
+ alt="Drama Poster"
+ />
+ </div>
+ </Link>
+ ))
+ ) : (
+ <div style={{ margin: "0px auto" }}>
+ <p
+ style={{
+ color: "white",
+ fontFamily: "Kanit",
+ fontSize: 18,
+ }}
+ >
+ No results found
+ </p>
+ </div>
+ )
+ ) : null}
+ </div>
+ );
+}