sorting
This commit is contained in:
parent
a086a4935e
commit
dea69d7e76
4 changed files with 11 additions and 11 deletions
|
|
@ -30,7 +30,7 @@ const Card = (props) => {
|
|||
<div className="imagefit bg-cover rounded mx-auto justify-center items-center inline-flex ml-2" style={{'backgroundImage':`url("${props.item[`thumbnail`] ? props.item[`thumbnail`] : props.categoryId==="XXX"?"https://i.therarbg.com/xnp.jpg": "https://i.therarbg.com/np.jpg"}")`,width:"50px",height:"50px"}}>
|
||||
</div>
|
||||
|
||||
<div className="text-off-white flex items-center text-[14px] w-[90%] text-left h-auto pt-1.5 text-ellipsis overflow-hidden pl-4 font-medium break-all">
|
||||
<div className="text-off-white flex items-center text-[14px] w-[90%] text-left h-auto pt-1.5 text-ellipsis overflow-hidden pl-4 font-medium break-all">
|
||||
|
||||
{props?.item?.name}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const CardCompact = (props) => {
|
|||
<div className="bg-cover imagefit rounded mx-auto justify-center items-center inline-flex ml-2" style={{'backgroundImage':`url("${props.item[`t`] ? props.item[`t`] : props.categoryId==="XXX"?"https://i.therarbg.com/xnp.jpg": "https://i.therarbg.com/np.jpg"}")`, width:"50px",height:"50px"}}>
|
||||
</div>
|
||||
|
||||
<div className="text-off-white w-full text-[12px] text-left h-auto pt-1.5 text-ellipsis overflow-hidden pl-4 font-medium break-all">
|
||||
<div className="text-off-white flex w-full text-[14px] items-center font-extralight text-left h-auto pt-1.5 text-ellipsis overflow-hidden pl-4 font-medium break-all">
|
||||
<span>
|
||||
{name}
|
||||
</span>
|
||||
|
|
@ -36,7 +36,7 @@ const CardCompact = (props) => {
|
|||
</div>
|
||||
|
||||
|
||||
<div className="flex text-off-white h-auto pt-1.5 shift-right long-and-truncated font-light gap-4" style={{fontSize:"12px"}}>
|
||||
<div className="flex text-off-white h-auto pt-1.5 shift-right items-center long-and-truncated font-extralight gap-4" style={{fontSize:"14px"}}>
|
||||
<span className='w-14'>
|
||||
{props.item['c'] || props.categoryId}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import CardCompact from '../../Common/CardCompact';
|
|||
|
||||
const Latest = () => {
|
||||
const router = useRouter()
|
||||
const { category, time } = router.query;
|
||||
const categoryId = category ? category.split(':')[1] : "Movies";
|
||||
const { category } = router.query;
|
||||
const categoryId = category ? category.split(':')[1] : null;
|
||||
|
||||
let data = [{ name: "Movie", cat: "Movies", time: "10D", color: "#ee7633" },
|
||||
{ name: "TV-Show", cat: "TV", time: "10D", color: "#7affb8" },
|
||||
|
|
@ -39,9 +39,9 @@ const Latest = () => {
|
|||
fetchMovieList(cat);
|
||||
}, [page])
|
||||
useEffect(() => {
|
||||
fetchMovieListRefresh(cat);
|
||||
setCat(categoryId)
|
||||
}, [categoryId])
|
||||
fetchMovieListRefresh(category?.split(':')[1]);
|
||||
setCat(category?.split(':')[1])
|
||||
}, [category])
|
||||
|
||||
const fetchMovieList = (cat) => {
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ const Latest = () => {
|
|||
|
||||
return (
|
||||
<div className='text-center font-montserrat'>
|
||||
{loader ? <Loader /> : null}
|
||||
{!movieList.length>0 ? <Loader /> : null}
|
||||
|
||||
<div className='w-full justify-end'>
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ const Latest = () => {
|
|||
setCat(item?.cat)
|
||||
setPage(1)
|
||||
router.push(`/get-posts/category:${item?.cat}`)
|
||||
}} key={index} className="flex bg-primary/15 cursor-pointer font-medium text-[14px] rounded lowercase my-1 mx-2 px-2 py-0.5 hover:bg-[#008000] hover:text-white"
|
||||
}} key={index} className="flex bg-primary/15 cursor-pointer font-light text-[15px] rounded lowercase my-1 mx-2 px-2 py-0.5 hover:bg-[#008000] hover:text-white"
|
||||
style={{ color: cat === item?.cat ? "#fff" : item?.color, background: cat === item?.cat ? "#008000" : "" }}>
|
||||
<label className='cursor-pointer'>{item?.name} </label></div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const handleClose =()=>{
|
|||
|
||||
return (
|
||||
<>
|
||||
|
||||
|
||||
<Head>
|
||||
<title>{movie?.detail?.title} | </title>
|
||||
</Head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue