diff options
Diffstat (limited to 'src/app/web-series/components')
| -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 |
4 files changed, 13 insertions, 15 deletions
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" |