diff --git a/Common/Card.js b/Common/Card.js index 1591e2b..0ce978d 100644 --- a/Common/Card.js +++ b/Common/Card.js @@ -1,6 +1,5 @@ -import React from 'react' -import { useRouter } from 'next/router' -import { useTheme } from 'next-themes' +import React from 'react'; +import {useRouter } from 'next/router'; function formatBytes(bytes, decimals = 1) { if (!+bytes) return '0 Bytes' @@ -13,85 +12,46 @@ function formatBytes(bytes, decimals = 1) { return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}` } -function cleanMovieNames(movieName) { - const pattern = - /(2160p|1080p|720p|360p|4320p|H265|BluRay|Rip|10 bit|DV|HDR10|ita|eng|AC3|5\.1|sub|Licdom|UpScaled|5 1|su)/gi - const cleanedNames = movieName.replace(pattern, '').trim() - return cleanedNames -} - -const Card = props => { - const router = useRouter() - const { theme, setTheme } = useTheme() - let name = props.item[`name`] - let time = new Date(props.item[`timestamp`]) +const Card = (props) => { + const router = useRouter(); + let name = props.item[`name`]; + let time = new Date(props.item[`timestamp`]); return ( -
{renderYear(year)}
@@ -43,7 +43,7 @@ export default function CardInfo({ className={ isTrending ? 'md:heading-sm text-ellips w-[200px] truncate text-sm font-bold capitalize text-app-pure-white sm:w-[420px] md:h-6' - : 'md:heading-xs text-ellips w-[150px] truncate text-sm font-bold capitalize text-black dark:text-app-pure-white sm:w-[180px] md:w-[200px] lg:w-[268px]' + : 'md:heading-xs text-ellips w-[150px] truncate text-sm font-bold capitalize text-app-pure-white sm:w-[180px] md:w-[200px] lg:w-[268px]' } > {title} @@ -52,7 +52,7 @@ export default function CardInfo({ ) } -export function renderYear(year) { +function renderYear(year) { if (!year) { return 'N/A' } else { @@ -60,15 +60,15 @@ export function renderYear(year) { } } -export function renderCategoryIcon(category) { +function renderCategoryIcon(category) { if (category === 'movie') { - return{renderYear(year)}
-- {renderCategoryText(category)} -
-{renderRating(rating)}
*/} -Length
-{length.split("?")[0]}
+Length
+{length}
Language
-{language}
+Language
+{language}
Year
-{year}
+Year
+{year}
Status
-{status}
+Status
+{status}
Language
-{language}
+Language
+{language}
First Air
-{firstAir}
+First Air
+{firstAir}
Last Air
-{lastAir}
+Last Air
+{lastAir}
Status
-{status}
+Status
+{status}
Download
- -Play Now
- +Download
+IMDB
- {media_type} -
} -+ { media_type} +
}