detail add loading

This commit is contained in:
hyunwoo93.cha
2024-06-17 10:40:10 +09:00
parent 8e633de41e
commit 43acf07d48
3 changed files with 18 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ import { TAxios } from "../api/TAxios";
import { CATEGORY_DATA_MAX_RESULTS_LIMIT } from "../utils/Config";
import * as HelperMethods from "../utils/helperMethods";
import { types } from "./actionTypes";
import { changeAppStatus } from "./commonActions";
export const getMainLiveShow = (props) => (dispatch, getState) => {
const onSuccess = (response) => {
@@ -56,6 +57,9 @@ export const setMainLiveUpcomingAlarm = (props) => (dispatch, getState) => {
// 디테일상품 조회 LF-LGSP-015
export const getMainCategoryDetail = (props) => (dispatch, getState) => {
const { patnrId, prdtId } = props;
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: "wait" } }));
const onSuccess = (response) => {
console.log("getMainCategoryDetail onSuccess ", response.data);
@@ -63,10 +67,13 @@ export const getMainCategoryDetail = (props) => (dispatch, getState) => {
type: types.GET_PRODUCT_DETAIL,
payload: response.data.data,
});
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
const onFail = (error) => {
console.error("getMainCategoryDetail onFail", error);
dispatch(changeAppStatus({ showLoadingPanel: { show: false } }));
};
TAxios(