diff --git a/.DS_Store b/.DS_Store index 2888ad65..a29289d1 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e43b0f98 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/com.twin.app.shoptime/src/features/home/homeSlice.js b/com.twin.app.shoptime/src/features/home/homeSlice.js index 063f4254..a3fb2726 100644 --- a/com.twin.app.shoptime/src/features/home/homeSlice.js +++ b/com.twin.app.shoptime/src/features/home/homeSlice.js @@ -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,9 +134,15 @@ export const homeSlice = createSlice({ //임시코드 state.menuData = action.payload; }, + updateLayoutData: (state, action) => { + state.layoutData = action.payload; + }, + updateMainContentsData: (state, action) => { + state.mainContentsData = action.payload; + } }, }); export const { updateTermsData, updateMenuData, updateLayoutData, updateMainContentsData } = homeSlice.actions; -export default homeSlice.reducer; +export default homeSlice.reducer; \ No newline at end of file