[FeaturedBrandsPanel] section, LIVE CHANNELS, 라이브 없는 경우 수정
Detail Notes : 1. action type 추가 및 reducer 수정 (response 느린 관계)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user