diff options
| author | real-zephex <[email protected]> | 2024-05-29 01:04:20 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-29 01:04:20 +0530 |
| commit | e28fba92670b5c2775a512511346136991698cbc (patch) | |
| tree | 5d40f1b802af30859b06e4c7f577fd50f3cc74cb /src/app/web-series/components/seriesSearchFormatter.jsx | |
| parent | Merge pull request #39 from real-zephex/homepage-redesign (diff) | |
| parent | ✨ feat(series): rewrite series page and drop manga support (diff) | |
| download | dramalama-e28fba92670b5c2775a512511346136991698cbc.tar.xz dramalama-e28fba92670b5c2775a512511346136991698cbc.zip | |
Merge pull request #41 from real-zephex/series-overhaul
✨ feat(series): rewrite series page and drop manga support
Diffstat (limited to 'src/app/web-series/components/seriesSearchFormatter.jsx')
| -rw-r--r-- | src/app/web-series/components/seriesSearchFormatter.jsx | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/app/web-series/components/seriesSearchFormatter.jsx b/src/app/web-series/components/seriesSearchFormatter.jsx new file mode 100644 index 0000000..408e7c0 --- /dev/null +++ b/src/app/web-series/components/seriesSearchFormatter.jsx @@ -0,0 +1,49 @@ +import { Card, CardHeader, CardBody } from "@nextui-org/react"; +import Link from "next/link"; +import Image from "next/image"; + +import styles from "../../page.module.css"; + +const SeriesSearchFormatter = async (data) => { + return ( + <section + className={`flex items-center overflow-auto pb-2 mb-2 ${styles.ScrollBarAdjuster}`} + > + {data && + data.results.map((item, index) => { + if (item.poster_path) { + return ( + <Link + key={index} + href={`/web-series/${item.id}`} + aria-label="anime redirection links" + className="flex flex-col items-center mx-1 " + > + <Card className="overflow-hidden" isPressable> + <CardBody> + <Image + alt="Searched Movie Poster" + src={`https://sup-proxy.zephex0-f6c.workers.dev/api-content?url=https://image.tmdb.org/t/p/original${item.poster_path}`} + width={190} + height={120} + className="rounded-md h-64" + priority + /> + </CardBody> + <CardHeader> + <h4 + className={`antialiased text-small text-center uppercase w-44 overflow-hidden whitespace-nowrap text-ellipsis `} + > + {item.name} + </h4> + </CardHeader> + </Card> + </Link> + ); + } + })} + </section> + ); +}; + +export default SeriesSearchFormatter; |