[actions, reducers] network 상태 관리 추가에 따른 수정
Detail Notes :
This commit is contained in:
@@ -4,12 +4,23 @@ import { types } from "./actionTypes";
|
||||
|
||||
// Featured Brands 정보 조회 IF-LGSP-304
|
||||
export const getBrandList = () => (dispatch, getState) => {
|
||||
dispatch({
|
||||
type: types.GET_BRAND_LIST,
|
||||
payload: {
|
||||
data: getState().brand.brandInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandList onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_LIST,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -33,12 +44,23 @@ export const getBrandList = () => (dispatch, getState) => {
|
||||
export const getBrandLayoutInfo = (props) => (dispatch, getState) => {
|
||||
const { patnrId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_LAYOUT_INFO,
|
||||
payload: {
|
||||
data: getState().brand.brandLayoutInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandLayoutInfo onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_LAYOUT_INFO,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -62,12 +84,22 @@ export const getBrandLayoutInfo = (props) => (dispatch, getState) => {
|
||||
export const getBrandLiveChannelInfo = (props) => (dispatch, getState) => {
|
||||
const { patnrId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_LIVE_CHANNEL_INFO,
|
||||
payload: {
|
||||
data: getState().brand.brandLiveChannelInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandLiveChannelInfo onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_LIVE_CHANNEL_INFO,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -91,12 +123,23 @@ export const getBrandLiveChannelInfo = (props) => (dispatch, getState) => {
|
||||
export const getBrandTSVInfo = (props) => (dispatch, getState) => {
|
||||
const { patnrId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_TSV_INFO,
|
||||
payload: {
|
||||
data: getState().brand.brandTsvInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandTSVInfo onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_TSV_INFO,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -120,12 +163,23 @@ export const getBrandTSVInfo = (props) => (dispatch, getState) => {
|
||||
export const getBrandRecommendedShowInfo = (props) => (dispatch, getState) => {
|
||||
const { catCd, patnrId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_RECOMMENDED_SHOW_INFO,
|
||||
payload: {
|
||||
data: getState().brand.brandRecommendedShowInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandRecommendedShowInfo onSuccess", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_RECOMMENDED_SHOW_INFO,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -149,12 +203,23 @@ export const getBrandRecommendedShowInfo = (props) => (dispatch, getState) => {
|
||||
export const getBrandCreatorsInfo = (props) => (dispatch, getState) => {
|
||||
const { hstNm, patnrId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_CREATORS_INFO,
|
||||
payload: {
|
||||
data: getState().brand.brandCreatorsInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandCreatorsInfo onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_CREATORS_INFO,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -178,12 +243,23 @@ export const getBrandCreatorsInfo = (props) => (dispatch, getState) => {
|
||||
export const getBrandSeriesInfo = (props) => (dispatch, getState) => {
|
||||
const { patnrId, seriesId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_SERIES_INFO,
|
||||
payload: {
|
||||
data: getState().brand.brandSeriesInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandSeriesInfo onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_SERIES_INFO,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -207,12 +283,23 @@ export const getBrandSeriesInfo = (props) => (dispatch, getState) => {
|
||||
export const getBrandCategoryInfo = (props) => (dispatch, getState) => {
|
||||
const { catCdLv1, catCdLv2, patnrId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_CATEGORY_INFO,
|
||||
payload: {
|
||||
data: getState().brand.brandCategoryInfoData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandCategoryInfo onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_CATEGORY_INFO,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -236,12 +323,23 @@ export const getBrandCategoryInfo = (props) => (dispatch, getState) => {
|
||||
export const getBrandBestSeller = (props) => (dispatch, getState) => {
|
||||
const { patnrId } = props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_BEST_SELLER,
|
||||
payload: {
|
||||
data: getState().brand.brandBestSellerData.data,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("@@ getBrandBestSeller onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_BRAND_BEST_SELLER,
|
||||
payload: response.data.data,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user