diff options
| author | real-zephex <[email protected]> | 2024-05-29 01:00:42 +0530 |
|---|---|---|
| committer | real-zephex <[email protected]> | 2024-05-29 01:00:42 +0530 |
| commit | 9497598754c5a810974c6040e78c295ff0a4ed6f (patch) | |
| tree | 5d40f1b802af30859b06e4c7f577fd50f3cc74cb /src/app/web-series/components/HomePageModules.jsx | |
| parent | Merge pull request #39 from real-zephex/homepage-redesign (diff) | |
| download | dramalama-9497598754c5a810974c6040e78c295ff0a4ed6f.tar.xz dramalama-9497598754c5a810974c6040e78c295ff0a4ed6f.zip | |
✨ feat(series): rewrite series page and drop manga support
Diffstat (limited to 'src/app/web-series/components/HomePageModules.jsx')
| -rw-r--r-- | src/app/web-series/components/HomePageModules.jsx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/app/web-series/components/HomePageModules.jsx b/src/app/web-series/components/HomePageModules.jsx deleted file mode 100644 index 91d90bf..0000000 --- a/src/app/web-series/components/HomePageModules.jsx +++ /dev/null @@ -1,56 +0,0 @@ -import { POPULAR_SHOWS, TRENDING_SHOWS, TOP_SHOWS } from "./data-fetch"; -import styles from "../styles/pages.module.css"; -import Image from "next/image"; -import Link from "next/link"; -import PreFecthSeriesInfo from "./cacher"; - -const HomepageUtils = async (type) => { - const fetchFunctions = { - popular: POPULAR_SHOWS, - trending: TRENDING_SHOWS, - top: TOP_SHOWS, - }; - - const fetchData = fetchFunctions[type]; - - if (fetchData) { - return await fetchData(); - } else { - return; - } -}; - -const Pages = async ({ type: type }) => { - const data = await HomepageUtils(type); - PreFecthSeriesInfo(data); - return ( - <main className={styles.main}> - <h2>{type} series</h2> - <section className={styles.SeriesContainer}> - {data && - data.results.length > 0 && - data.results.map((item, index) => ( - <Link - key={index} - href={`/web-series/${item.id}`} - style={{ textDecoration: "none", color: "white" }} - title={item.name} - > - <section className={styles.SeriesEntry}> - <Image - src={`https://sup-proxy.zephex0-f6c.workers.dev/api-content?url=https://image.tmdb.org/t/p/original${item.poster_path}`} - width={180} - height={300} - alt="Series Poster" - priority - /> - <p>{item.name || "Not sure"}</p> - </section> - </Link> - ))} - </section> - </main> - ); -}; - -export default Pages; |