[HomePanel, OnSalePanel, TabLayout] focus fix & action edit
detail note: 1. Home OnSale > OnSale > Home OnSale의 경우 node를 찾지 못해 focus되지 않는 문제 수정 2. OnSalePanel, LoadingPanel 반영 3. TabLayout, 불필요 디펜던시 props 삭제
This commit is contained in:
@@ -1,48 +1,56 @@
|
||||
import { URLS } from "../api/apiConfig";
|
||||
import { TAxios } from "../api/TAxios";
|
||||
import { types } from "./actionTypes";
|
||||
import { changeAppStatus } from "./commonActions";
|
||||
|
||||
// On Sale 조회 IF-LGSP-086
|
||||
export const getOnSaleInfo = (props) => (dispatch, getState) => {
|
||||
const { categoryIncFlag, homeSaleInfosIncFlag, lgCatCd, saleInfosIncFlag } =
|
||||
props;
|
||||
export const getOnSaleInfo =
|
||||
(props, showLoadingPanel = false) =>
|
||||
(dispatch, getState) => {
|
||||
const { categoryIncFlag, homeSaleInfosIncFlag, lgCatCd, saleInfosIncFlag } =
|
||||
props;
|
||||
|
||||
dispatch({
|
||||
type: types.GET_ON_SALE_INFO,
|
||||
payload: {
|
||||
...getState().onSale.onSaleData,
|
||||
status: "pending",
|
||||
},
|
||||
});
|
||||
if (showLoadingPanel) {
|
||||
dispatch(
|
||||
changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } })
|
||||
);
|
||||
}
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("getOnSaleInfo onSuccess ", response.data);
|
||||
const onSuccess = (response) => {
|
||||
console.log("getOnSaleInfo onSuccess ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_ON_SALE_INFO,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
status: "fulfilled",
|
||||
},
|
||||
});
|
||||
dispatch({
|
||||
type: types.GET_ON_SALE_INFO,
|
||||
payload: {
|
||||
data: response.data.data,
|
||||
},
|
||||
});
|
||||
|
||||
if (showLoadingPanel) {
|
||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
}
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
console.error("getOnSaleInfo onFail", error);
|
||||
|
||||
if (showLoadingPanel) {
|
||||
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
|
||||
}
|
||||
};
|
||||
|
||||
TAxios(
|
||||
dispatch,
|
||||
getState,
|
||||
"get",
|
||||
URLS.GET_ON_SALE_INFO,
|
||||
{ categoryIncFlag, homeSaleInfosIncFlag, lgCatCd, saleInfosIncFlag },
|
||||
{},
|
||||
onSuccess,
|
||||
onFail
|
||||
);
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
console.error("getOnSaleInfo onFail", error);
|
||||
};
|
||||
|
||||
TAxios(
|
||||
dispatch,
|
||||
getState,
|
||||
"get",
|
||||
URLS.GET_ON_SALE_INFO,
|
||||
{ categoryIncFlag, homeSaleInfosIncFlag, lgCatCd, saleInfosIncFlag },
|
||||
{},
|
||||
onSuccess,
|
||||
onFail
|
||||
);
|
||||
};
|
||||
|
||||
export const copyCategoryInfos = (categoryInfos) => ({
|
||||
type: types.COPY_CATEGORY_INFO,
|
||||
payload: categoryInfos,
|
||||
|
||||
Reference in New Issue
Block a user