From f2ab9dbdd4d10df7559705ffc7409364ab24347f Mon Sep 17 00:00:00 2001 From: optrader Date: Tue, 9 Dec 2025 17:04:16 +0900 Subject: [PATCH] [251209] feat: NBCU-ShopByShow-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ• ์ปค๋ฐ‹ ์‹œ๊ฐ„: 2025. 12. 09. 17:04:16 ๐Ÿ“Š ๋ณ€๊ฒฝ ํ†ต๊ณ„: โ€ข ์ด ํŒŒ์ผ: 1๊ฐœ โ€ข ์ถ”๊ฐ€: +16์ค„ โ€ข ์‚ญ์ œ: -2์ค„ ๐Ÿ“ ์ˆ˜์ •๋œ ํŒŒ์ผ: ~ com.twin.app.shoptime/src/reducers/brandReducer.js ๐Ÿ”ง ์ฃผ์š” ๋ณ€๊ฒฝ ๋‚ด์šฉ: โ€ข ํ•ต์‹ฌ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง ๊ฐœ์„  --- .../src/reducers/brandReducer.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/com.twin.app.shoptime/src/reducers/brandReducer.js b/com.twin.app.shoptime/src/reducers/brandReducer.js index 0bd6a236..68d117a9 100644 --- a/com.twin.app.shoptime/src/reducers/brandReducer.js +++ b/com.twin.app.shoptime/src/reducers/brandReducer.js @@ -159,11 +159,25 @@ export const brandReducer = (state = initialState, action) => { brandRecentlyAiredData: action.payload, }; - case types.GET_BRAND_SHOP_BY_SHOW: + case types.GET_BRAND_SHOP_BY_SHOW: { + // ์ผ๋ถ€ ์‘๋‹ต์€ ๋ฆฌ์ŠคํŠธ ์—†์ด ๋‚ด๋ ค์™€ ๊ธฐ์กด ๋ฐ์ดํ„ฐ๋ฅผ ๋ฎ์–ด ์ง€์šฐ๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์–ด ์กฐ๊ฑด๋ถ€ ๋ณ‘ํ•ฉ + const prevData = state.brandShopByShowData?.data || {}; + const nextData = action.payload?.data || {}; + const hasNextList = Array.isArray(nextData.brandShopByShowContsList); + + // ๋ฆฌ์ŠคํŠธ๊ฐ€ ์—†์œผ๋ฉด ์ด์ „ ๋ฆฌ์ŠคํŠธ ์œ ์ง€ + const mergedData = hasNextList + ? nextData + : { ...prevData, ...nextData, brandShopByShowContsList: prevData.brandShopByShowContsList }; + return { ...state, - brandShopByShowData: action.payload, + brandShopByShowData: { + ...action.payload, + data: mergedData, + }, }; + } case types.SET_BRAND_LIVE_CHANNEL_UPCOMING: return {