[Category] Chage category width and add popular show conditional statement

This commit is contained in:
jangheon Pyo
2024-07-18 19:54:17 +09:00
parent bbfd091c65
commit 4171c4845a
3 changed files with 8 additions and 4 deletions

View File

@@ -8,6 +8,5 @@
margin-top: 34px; margin-top: 34px;
> div { > div {
margin: 0 15px 15px 0; margin: 0 15px 15px 0;
width: 100%;
} }
} }

View File

@@ -2,6 +2,7 @@
@import "../../../../style/utils.module.less"; @import "../../../../style/utils.module.less";
.container { .container {
width: 100%;
margin-top: 100px; margin-top: 100px;
.info { .info {

View File

@@ -1,4 +1,5 @@
import React from "react"; import React from "react";
import { useSelector } from "react-redux";
import NoResultsImage from "../../../../../assets/images/searchpanel/img-search-nodata.png"; import NoResultsImage from "../../../../../assets/images/searchpanel/img-search-nodata.png";
import { $L } from "../../../../utils/helperMethods"; import { $L } from "../../../../utils/helperMethods";
@@ -6,6 +7,7 @@ import PopularShow from "../../../HomePanel/PopularShow/PopularShow";
import css from "./NoResultsCategoryShow.module.less"; import css from "./NoResultsCategoryShow.module.less";
export default function NoResultsCategoryShows() { export default function NoResultsCategoryShows() {
const topInfos = useSelector((state) => state.main?.top20ShowData?.topInfos);
return ( return (
<div className={css.container}> <div className={css.container}>
<div className={css.info}> <div className={css.info}>
@@ -14,9 +16,11 @@ export default function NoResultsCategoryShows() {
</div> </div>
<p>{$L("THERE ARE NO SHOWS AVAILABLE")}</p> <p>{$L("THERE ARE NO SHOWS AVAILABLE")}</p>
</div> </div>
<div className={css.popularShowWrap}> {topInfos?.length > 0 && (
<PopularShow homeChk={false} /> <div className={css.popularShowWrap}>
</div> <PopularShow homeChk={false} />
</div>
)}
</div> </div>
); );
} }