redux-toolkit -> redux 마이그레이션 및 TAxios 로직 수정

This commit is contained in:
hyunwoo93.cha
2024-02-01 01:44:12 +09:00
parent a812c70ebe
commit 1c9ce1c5b8
90 changed files with 2228 additions and 1943 deletions

View File

@@ -0,0 +1,32 @@
import { URLS } from "../api/apiConfig";
import { TAxios } from "../api/TAxios";
import { types } from "./actionTypes";
// On Sale 조회 IF-LGSP-086
export const getOnSaleInfo = (props) => (dispatch, getState) => {
const { categoryIncFlag, lgCatCd } = props;
const onSuccess = (response) => {
console.log("getOnSaleInfo onSuccess ", response.data);
dispatch({
type: types.GET_ON_SALE_INFO,
payload: response.data.data,
});
};
const onFail = (error) => {
console.error("getOnSaleInfo onFail", error);
};
TAxios(
dispatch,
getState,
"get",
URLS.GET_ON_SALE_INFO,
{ categoryIncFlag, lgCatCd },
{},
onSuccess,
onFail
);
};