[홈 슬라이스 수정]

This commit is contained in:
sungmin.in
2024-01-29 14:40:05 +09:00
parent 395c49ef17
commit da7bae6bd8
3 changed files with 10 additions and 3 deletions

BIN
.DS_Store vendored

Binary file not shown.

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.DS_Store

View File

@@ -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;
}
},
});