[TToast, commonAction, commonReducer] 공통 컴포넌트 TToast 추가, 리덕스 액션 및 상태관리 추가

This commit is contained in:
hyunwoo93.cha
2024-02-28 13:58:29 +09:00
parent 4935b62515
commit 577378551f
16 changed files with 119 additions and 9 deletions

View 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
);
};