productdetail 코드 수정
This commit is contained in:
@@ -25,8 +25,8 @@ export const mainReducer = (state = initialState, action) => {
|
||||
const dataType = action.payload.categoryShowInfos
|
||||
? "categoryShowInfos"
|
||||
: action.payload.categoryItemInfos
|
||||
? "categoryItemInfos"
|
||||
: null;
|
||||
? "categoryItemInfos"
|
||||
: null;
|
||||
|
||||
if (!dataType) {
|
||||
return {
|
||||
@@ -46,8 +46,8 @@ export const mainReducer = (state = initialState, action) => {
|
||||
const subKey = action.payload[dataType]?.subCatShowList
|
||||
? "subCatShowList"
|
||||
: action.payload[dataType]?.subCatItemList
|
||||
? "subCatItemList"
|
||||
: null;
|
||||
? "subCatItemList"
|
||||
: null;
|
||||
|
||||
if (!subKey) {
|
||||
return {
|
||||
@@ -119,8 +119,7 @@ export const mainReducer = (state = initialState, action) => {
|
||||
};
|
||||
case types.GET_PRODUCT_DETAIL: {
|
||||
const data = action.payload.product[0];
|
||||
const productGroup = action.payload.product[0].grPrdtFlag;
|
||||
|
||||
const productGroup = data?.grPrdtFlag;
|
||||
const images = data.imgUrls600;
|
||||
const media = data.prdtMediaUrl;
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user