diff options
Diffstat (limited to 'src/app/web-series')
| -rw-r--r-- | src/app/web-series/[id]/page.jsx | 6 | ||||
| -rw-r--r-- | src/app/web-series/components/cacher.js | 4 | ||||
| -rw-r--r-- | src/app/web-series/components/search.jsx | 6 | ||||
| -rw-r--r-- | src/app/web-series/components/seriesSearchFormatter.jsx | 10 | ||||
| -rw-r--r-- | src/app/web-series/components/videoPlayer.jsx | 8 | ||||
| -rw-r--r-- | src/app/web-series/page.jsx | 14 |
6 files changed, 23 insertions, 25 deletions
diff --git a/src/app/web-series/[id]/page.jsx b/src/app/web-series/[id]/page.jsx index 06902b1..f3922de 100644 --- a/src/app/web-series/[id]/page.jsx +++ b/src/app/web-series/[id]/page.jsx @@ -18,8 +18,8 @@ const SeriesInfoPage = async ({ params }) => { }} className="h-screen bg-white dark:bg-black" > - <section className="absolute inset-0 bg-gradient-to-b from-transparent to-white-400 dark:to-black"> - <section className="pt-12 m-auto w-full lg:w-9/12"> + <section className="to-white-400 absolute inset-0 bg-gradient-to-b from-transparent dark:to-black"> + <section className="m-auto w-full pt-20 lg:w-9/12"> <SeriesVideoPlayer id={data.id} /> <div className="flex items-center"> <Image @@ -42,7 +42,7 @@ const SeriesInfoPage = async ({ params }) => { key={index} color="warning" variant="faded" - className="mr-1 mb-1" + className="mb-1 mr-1" > <p className="text-xs"> {item.name} diff --git a/src/app/web-series/components/cacher.js b/src/app/web-series/components/cacher.js index 3e2a197..a75094e 100644 --- a/src/app/web-series/components/cacher.js +++ b/src/app/web-series/components/cacher.js @@ -1,3 +1,5 @@ +"use server"; + import { SERIES_INFO } from "./data-fetch"; const PreFecthSeriesInfo = async (data) => { @@ -11,7 +13,7 @@ const PreFecthSeriesInfo = async (data) => { } catch (error) { console.error( "Error occurred while pre-fetching series info page:", - error + error, ); } }; diff --git a/src/app/web-series/components/search.jsx b/src/app/web-series/components/search.jsx index ecf392c..492b30e 100644 --- a/src/app/web-series/components/search.jsx +++ b/src/app/web-series/components/search.jsx @@ -6,8 +6,6 @@ import { Input, Progress } from "@nextui-org/react"; import { SEARCH_TV } from "./data-fetch"; import SeriesSearchFormatter from "./seriesSearchFormatter"; import PreFecthSeriesInfo from "./cacher"; -// import { SearchMovie } from "./requestsHandler"; -// import MovieSearchFormatter from "./searchFormatter"; const SeriesSearchBar = () => { const [seriesTitle, setSeriesTitle] = useState(""); @@ -21,7 +19,7 @@ const SeriesSearchBar = () => { isIndeterminate aria-label="Loading..." className="w-full" - /> + />, ); const data = await SEARCH_TV(seriesTitle); PreFecthSeriesInfo(data); @@ -31,7 +29,7 @@ const SeriesSearchBar = () => { return ( <section> - <div className="flex flex-col w-full md:flex-nowrap gap-2 lg:w-1/2"> + <div className="flex w-full flex-col gap-2 md:flex-nowrap lg:w-1/2"> <Input type="text" label="Search for series" diff --git a/src/app/web-series/components/seriesSearchFormatter.jsx b/src/app/web-series/components/seriesSearchFormatter.jsx index ada00fb..3b119d6 100644 --- a/src/app/web-series/components/seriesSearchFormatter.jsx +++ b/src/app/web-series/components/seriesSearchFormatter.jsx @@ -1,5 +1,3 @@ -"use server"; - import { Card, CardHeader, CardBody } from "@nextui-org/react"; import Link from "next/link"; import Image from "next/image"; @@ -9,7 +7,7 @@ import styles from "../../page.module.css"; const SeriesSearchFormatter = async (data) => { return ( <section - className={`flex items-center overflow-auto pb-2 mb-2 ${styles.ScrollBarAdjuster}`} + className={`mb-2 flex items-center overflow-auto pb-2 ${styles.ScrollBarAdjuster}`} > {data && data.results.map((item, index) => { @@ -19,7 +17,7 @@ const SeriesSearchFormatter = async (data) => { key={index} href={`/web-series/${item.id}`} aria-label="anime redirection links" - className="flex flex-col items-center mx-1 " + className="mx-1 flex flex-col items-center" > <Card className="overflow-hidden" isPressable> <CardBody> @@ -28,13 +26,13 @@ const SeriesSearchFormatter = async (data) => { 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" + className="h-64 rounded-md" priority /> </CardBody> <CardHeader> <h4 - className={`antialiased text-small text-center uppercase w-44 overflow-hidden whitespace-nowrap text-ellipsis `} + className={`w-44 overflow-hidden text-ellipsis whitespace-nowrap text-center text-small uppercase antialiased`} > {item.name} </h4> diff --git a/src/app/web-series/components/videoPlayer.jsx b/src/app/web-series/components/videoPlayer.jsx index 50a703d..49f44f5 100644 --- a/src/app/web-series/components/videoPlayer.jsx +++ b/src/app/web-series/components/videoPlayer.jsx @@ -16,11 +16,11 @@ const SeriesVideoPlayer = ({ id: id }) => { const VideoFrameGenerator = (sea, epi) => { return ( <iframe - src={`https://vidsrc.pro/embed/tv/${id}/${sea}/${epi}`} + src={`https://vidsrc.pro/embed/tv/${id}/${sea}/${epi}?player=new`} allowFullScreen referrerPolicy="origin" height={720} - className="w-full h-[240px] lg:h-[720px]" + className="h-[240px] w-full rounded-md lg:h-[720px]" ></iframe> ); }; @@ -28,7 +28,7 @@ const SeriesVideoPlayer = ({ id: id }) => { function renderVideoFrame() { if (seasonNumber === "" || episodeNumber === "") { alert( - "Make sure that you have entered the episode number and the season number." + "Make sure that you have entered the episode number and the season number.", ); return; } @@ -39,7 +39,7 @@ const SeriesVideoPlayer = ({ id: id }) => { return ( <div> {videoFrame} - <div className="flex w-full items-center md:flex-nowrap gap-2 mt-2"> + <div className="mt-2 flex w-full items-center gap-2 md:flex-nowrap"> <Input type="number" label="Season" diff --git a/src/app/web-series/page.jsx b/src/app/web-series/page.jsx index 1adac80..f9e0b57 100644 --- a/src/app/web-series/page.jsx +++ b/src/app/web-series/page.jsx @@ -25,10 +25,10 @@ const SeriesHomepage = async () => { const HomepageDataFormatter = (title, data) => { return ( <section className="flex flex-col"> - <p className="text-sky-400 text-2xl font-bold">{title}</p> + <p className="text-2xl font-bold text-sky-400">{title}</p> <div - className={`flex items-center overflow-auto pb-2 mt-1 ${styles.ScrollBarAdjuster}`} + className={`mt-1 flex items-center overflow-auto pb-2 ${styles.ScrollBarAdjuster}`} > {data && data.results.map((item, index) => ( @@ -36,22 +36,22 @@ const SeriesHomepage = async () => { key={index} href={`/web-series/${item.id}`} aria-label="anime redirection links" - className="flex flex-col items-center mx-1 " + className="mx-1 flex flex-col items-center" > - <Card className="overflow-visible " isPressable> + <Card className="overflow-visible" isPressable> <CardBody> <Image alt="Movie Poster" src={`https://sup-proxy.zephex0-f6c.workers.dev/api-content?url=https://image.tmdb.org/t/p/original${item.poster_path}`} width={270} height={180} - className="h-64 rounded-md overflow-hidden" + className="h-64 overflow-hidden rounded-md" priority /> </CardBody> <CardHeader> <h4 - className={`antialiased text-small text-center uppercase w-44 overflow-hidden whitespace-nowrap text-ellipsis `} + className={`w-44 overflow-hidden text-ellipsis whitespace-nowrap text-center text-small uppercase antialiased`} > {item.name} </h4> @@ -65,7 +65,7 @@ const SeriesHomepage = async () => { }; return ( - <section className="pt-12"> + <section className="pt-4"> <div className="lg:ml-1"> <SeriesSearchBar /> </div> |