[TToast, commonAction, commonReducer] 공통 컴포넌트 TToast 추가, 리덕스 액션 및 상태관리 추가
This commit is contained in:
32
com.twin.app.shoptime/src/actions/cardActions.js
Normal file
32
com.twin.app.shoptime/src/actions/cardActions.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import { URLS } from "../api/apiConfig";
|
||||
import { TAxios } from "../api/TAxios";
|
||||
import { types } from "./actionTypes";
|
||||
|
||||
// 회원의 등록 카드 정보 조회 IF-LGSP-332
|
||||
export const getMyInfoCardSearch = (props) => (dispatch, getState) => {
|
||||
const { mbrNo } = props;
|
||||
|
||||
const onSuccess = (response) => {
|
||||
console.log("getMyInfoCardSearch onSuccess: ", response.data);
|
||||
|
||||
dispatch({
|
||||
type: types.GET_MY_INFO_CARD_SEARCH,
|
||||
payload: response.data.data,
|
||||
});
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
console.error("getMyInfoCardSearch OnFail: ", error);
|
||||
};
|
||||
|
||||
TAxios(
|
||||
dispatch,
|
||||
getState,
|
||||
"get",
|
||||
URLS.GET_MY_INFO_CARD_SEARCH,
|
||||
{ mbrNo },
|
||||
{},
|
||||
onSuccess,
|
||||
onFail
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user