[251210] feat: brandBestSelleInfo 처리

🕐 커밋 시간: 2025. 12. 10. 12:28:02

📊 변경 통계:
  • 총 파일: 3개
  • 추가: +17줄
  • 삭제: -2줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/actions/brandActions.js
  ~ com.twin.app.shoptime/src/views/FeaturedBrandsPanel/FeaturedBestSeller/FeaturedBestSeller.jsx
  ~ com.twin.app.shoptime/src/views/FeaturedBrandsPanel/FeaturedBrandsPanel.jsx

🔧 주요 변경 내용:
  • 핵심 비즈니스 로직 개선
This commit is contained in:
2025-12-10 12:28:03 +09:00
parent a6275a63e9
commit db7bc4b2ed
3 changed files with 17 additions and 2 deletions

View File

@@ -344,7 +344,10 @@ export const getBrandBestSeller = (props) => (dispatch, getState) => {
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: 'wait' } })); dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: 'wait' } }));
const onSuccess = (response) => { const onSuccess = (response) => {
console.log("[getBrandBestSeller] onSuccess - patnrId:", patnrId, "data:", response.data.data); console.log("[getBrandBestSeller] onSuccess - patnrId:", patnrId);
console.log("[getBrandBestSeller] Full response:", response.data.data);
console.log("[getBrandBestSeller] brandBestSellerInfo:", response.data.data.brandBestSellerInfo);
console.log("[getBrandBestSeller] brandBestSellerTitle in response:", response.data.data.brandBestSellerTitle);
dispatch({ dispatch({
type: types.GET_BRAND_BEST_SELLER, type: types.GET_BRAND_BEST_SELLER,

View File

@@ -19,6 +19,7 @@ const Container = SpotlightContainerDecorator(
const FeaturedBestSeller = ({ const FeaturedBestSeller = ({
brandBestSellerInfo, brandBestSellerInfo,
brandBestSellerTitle,
handleItemFocus, handleItemFocus,
order, order,
shelfOrder, shelfOrder,
@@ -28,6 +29,12 @@ const FeaturedBestSeller = ({
}) => { }) => {
const [firstChk, setFirstChk] = useState(0); const [firstChk, setFirstChk] = useState(0);
// brandBestSellerTitle 우선 사용, 없으면 shelfTitle, 없으면 기본값
const displayTitle = brandBestSellerTitle || shelfTitle || $L(STRING_CONF.BEST_SELLER);
console.log("[FeaturedBestSeller] brandBestSellerTitle:", brandBestSellerTitle);
console.log("[FeaturedBestSeller] displayTitle:", displayTitle);
const _handleItemFocus = useCallback(() => { const _handleItemFocus = useCallback(() => {
if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder); if (handleItemFocus) handleItemFocus(spotlightId, shelfOrder);
@@ -65,7 +72,7 @@ const FeaturedBestSeller = ({
spotlightId={spotlightId} spotlightId={spotlightId}
> >
<SectionTitle <SectionTitle
title={$L(STRING_CONF.BEST_SELLER)} title={displayTitle}
data-title="best-seller" data-title="best-seller"
label="best-seller Heading 1" label="best-seller Heading 1"
/> />

View File

@@ -237,6 +237,9 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
const brandBestSellerInfo = useSelector( const brandBestSellerInfo = useSelector(
(state) => state.brand.brandBestSellerData.data.brandBestSellerInfo (state) => state.brand.brandBestSellerData.data.brandBestSellerInfo
); );
const brandBestSellerTitle = useSelector(
(state) => state.brand.brandBestSellerData.data.brandBestSellerTitle
);
const brandRecommendedShowCategoryInfo = useSelector( const brandRecommendedShowCategoryInfo = useSelector(
(state) => (state) =>
state.brand.brandRecommendedShowInfoData.data state.brand.brandRecommendedShowInfoData.data
@@ -513,6 +516,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
{console.log("[FeaturedBrandsPanel] Rendering FeaturedBestSeller for patnrId:", selectedPatnrId)} {console.log("[FeaturedBrandsPanel] Rendering FeaturedBestSeller for patnrId:", selectedPatnrId)}
<FeaturedBestSeller <FeaturedBestSeller
brandBestSellerInfo={brandBestSellerInfo} brandBestSellerInfo={brandBestSellerInfo}
brandBestSellerTitle={brandBestSellerTitle}
handleItemFocus={handleItemFocus} handleItemFocus={handleItemFocus}
order={idx + 1} order={idx + 1}
shelfOrder={el.expsOrd} shelfOrder={el.expsOrd}
@@ -706,6 +710,7 @@ const FeaturedBrandsPanel = ({ isOnTop, panelInfo, spotlightId }) => {
); );
}, [ }, [
brandBestSellerInfo, brandBestSellerInfo,
brandBestSellerTitle,
brandCategoryInfo, brandCategoryInfo,
brandCategoryProductInfo, brandCategoryProductInfo,
brandChanInfo, brandChanInfo,