[홈 슬라이스 수정]
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.DS_Store
|
||||
@@ -68,7 +68,7 @@ export const getHomeLayout = createAsyncThunk(
|
||||
const onSuccess = (response) => {
|
||||
console.log("getHomeLayout onSuccess", response.data);
|
||||
|
||||
thunkAPI.dispatch(homeSlice.actions.updateLayoutData(response.data));
|
||||
thunkAPI.dispatch(homeSlice.actions.updateLayoutData(response.data.data));
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
@@ -96,7 +96,7 @@ export const getHomeMainContents = createAsyncThunk(
|
||||
const onSuccess = (response) => {
|
||||
console.log("getHomeMainContents onSuccess", response.data);
|
||||
|
||||
thunkAPI.dispatch(homeSlice.actions.updateMainContentsData(response.data));
|
||||
thunkAPI.dispatch(homeSlice.actions.updateMainContentsData(response.data.data));
|
||||
};
|
||||
|
||||
const onFail = (error) => {
|
||||
@@ -134,6 +134,12 @@ export const homeSlice = createSlice({
|
||||
//임시코드
|
||||
state.menuData = action.payload;
|
||||
},
|
||||
updateLayoutData: (state, action) => {
|
||||
state.layoutData = action.payload;
|
||||
},
|
||||
updateMainContentsData: (state, action) => {
|
||||
state.mainContentsData = action.payload;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user