From 3ed3b57fe40236c92c59219a1f109e755547c43b Mon Sep 17 00:00:00 2001 From: "junghoon86.park" Date: Wed, 31 Jan 2024 10:26:30 +0900 Subject: [PATCH] =?UTF-8?q?[mainPanel]=20spot=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/TGrid/TGrid.module.less | 2 + .../views/HomePanel/BestSeller/BestSeller.jsx | 48 ++++++--------- .../views/HomePanel/OnSale/OnSale.module.less | 2 +- .../HomePanel/PopularShow/PopularShow.jsx | 58 +++++++++---------- .../PopularShow/PopularShow.module.less | 6 +- .../HomePanel/SubCategory/SubCategory.jsx | 47 +++++++-------- 6 files changed, 74 insertions(+), 89 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TGrid/TGrid.module.less b/com.twin.app.shoptime/src/components/TGrid/TGrid.module.less index 08ea82c4..aaa11788 100644 --- a/com.twin.app.shoptime/src/components/TGrid/TGrid.module.less +++ b/com.twin.app.shoptime/src/components/TGrid/TGrid.module.less @@ -13,8 +13,10 @@ justify-content: unset; align-items: unset; flex-direction: unset; + overflow: hidden; } &.homeBestSeller { + overflow: hidden; justify-content: unset; } } diff --git a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx index 3b514286..f0c9daef 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/BestSeller/BestSeller.jsx @@ -6,7 +6,6 @@ import classNames from "classnames"; import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; import Spotlight from "@enact/spotlight"; -import Scroller from "@enact/sandstone/Scroller"; import TGrid from "../../../components/TGrid/TGrid"; import TItemCard from "../../../components/TItemCard/TItemCard"; @@ -22,34 +21,25 @@ const BestSeller = () => { (state) => state.product.bestSellerData.bestSeller ); return ( - -
- - - - {bestSellerDatas && - bestSellerDatas.map((bestSeller) => ( - - ))} - - -
+ + + + + {bestSellerDatas && + bestSellerDatas.map((bestSeller) => ( + + ))} + ); }; diff --git a/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.module.less b/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.module.less index 973c803f..2be0edf2 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.module.less +++ b/com.twin.app.shoptime/src/views/HomePanel/OnSale/OnSale.module.less @@ -18,7 +18,7 @@ height: 300px; display: flex; flex-wrap: nowrap; - overflow-x: auto; + overflow: hidden; .onSaleItemList { flex: none; width: 630px; diff --git a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx index a1603a9b..6201c95c 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.jsx @@ -3,7 +3,7 @@ import { useDispatch, useSelector } from "react-redux"; import { $L } from "../../../utils/helperMethods"; import { Job } from "@enact/core/util"; import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator"; -import Spotlight from "@enact/spotlight"; + import Spottable from "@enact/spotlight/Spottable"; import Scroller from "@enact/sandstone/Scroller"; import { getTop20Show } from "../../../features/main/mainSlice"; @@ -11,8 +11,8 @@ import classNames from "classnames"; import css from "../PopularShow/PopularShow.module.less"; const Container = SpotlightContainerDecorator( - { leaveFor: { left: "", right: "" }, enterTo: "last-focused" }, - "div" + { enterTo: "last-focused" }, + "section" ); const SpottableComponent = Spottable("li"); @@ -25,38 +25,36 @@ const PopularShow = (...rest) => { dispatch(getTop20Show()); }, []); return ( -
-
-

{$L("POPULAR SHOW")}

+ +

{$L("POPULAR SHOW")}

-
    - {topInfos && - topInfos.map((item) => { - return ( - + {topInfos && + topInfos.map((item) => { + return ( + + +
    - -
    - {item.showNm} -
    - - ); - })} -
-
-
+ {item.showNm} + + + ); + })} + +
); }; diff --git a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.module.less b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.module.less index fcd32188..a317457e 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.module.less +++ b/com.twin.app.shoptime/src/views/HomePanel/PopularShow/PopularShow.module.less @@ -1,8 +1,8 @@ @import "../../../style/CommonStyle.module.less"; .popularShow { padding: 60px 0 0; - width: 100%; - overflow-x: auto; + width: calc(100% - 60px); + overflow: hidden; margin-left: 60px; .subTitle { border-left: 6px solid @PRIMARY_COLOR_RED; @@ -16,7 +16,7 @@ .showList { margin-top: 20px; display: flex; - overflow: auto; + overflow: hidden; > li:nth-child(1n) { margin-right: 18px; border: 4px solid transparent; diff --git a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx index bfaf9e70..2b85f804 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx @@ -5,7 +5,7 @@ import Spotlight from "@enact/spotlight"; import Spottable from "@enact/spotlight/Spottable"; import { useDispatch, useSelector } from "react-redux"; import css from "./SubCategory.module.less"; -import Scroller from "@enact/sandstone/Scroller"; + import { getOnSaleInfo } from "../../../features/onSale/onSaleSlice"; import testimg from "../../../../assets/icon/nor/ic-category-home-nor@3x.png"; import testimg2 from "../../../../assets/icon/nor/ic-category-gift-nor@3x.png"; @@ -15,6 +15,7 @@ import OnSaleProductCard from "../../OnSalePanel/OnSaleProductCard/OnSaleProduct import OnSaleProductsGrid from "../../OnSalePanel/OnSaleProductsGrid/OnSaleProductsGrid"; import TGrid from "../../../components/TGrid/TGrid"; import TItemCard from "../../../components/TItemCard/TItemCard"; +import TScroller from "../../../components/TScroller/TScroller"; import { getSubCategory } from "../../../features/main/mainSlice"; import { SpotlightContainerDecorator } from "@enact/spotlight/SpotlightContainerDecorator"; @@ -24,8 +25,10 @@ const Container = SpotlightContainerDecorator( leaveFor: { left: "", right: "" }, enterTo: "last-focused", }, - "div" + "section" ); + +const SpottableComponent = Spottable("li"); const SubCategory = () => { const dispatch = useDispatch(); @@ -86,30 +89,22 @@ const SubCategory = () => { type="home" /> - - - {subCategoryData && - subCategoryData.slice(0, 9).map((item) => { - return ( - - ); - })} - - + + {subCategoryData && + subCategoryData.slice(0, 9).map((item) => { + return ( + + ); + })} + ); };