[FeaturedBrandsPanel] section, LIVE CHANNELS, 라이브 없는 경우 수정

Detail Notes :

1. action type 추가 및 reducer 수정 (response 느린 관계)
This commit is contained in:
younghoon100.park
2024-04-22 09:43:02 +09:00
parent 6862590113
commit 112b8b4db7
4 changed files with 45 additions and 15 deletions

View File

@@ -425,3 +425,29 @@ export const setBrandLiveChannelUpcoming = (props) => (dispatch, getState) => {
},
});
};
export const setBrandChanInfo = (props) => (dispatch, getState) => {
const { showId, strtDt } = props;
const storedBrandLiveChanInfo =
getState().brand.brandLiveChannelInfoData.data.brandChanInfo;
const brandChanInfo = storedBrandLiveChanInfo.map((item) => {
if (item.showId === showId && item.strtDt === strtDt) {
item.alamDispFlag = item.alamDispFlag === "Y" ? "N" : "Y";
}
return item;
});
dispatch({
type: types.SET_BRAND_CHAN_INFO,
payload: {
...getState().brand.brandLiveChannelInfoData,
data: {
...getState().brand.brandLiveChannelInfoData.data,
brandChanInfo,
},
},
});
};