From da7bae6bd8880acfd80fdc04ef147c11b4e09b3a Mon Sep 17 00:00:00 2001 From: "sungmin.in" Date: Mon, 29 Jan 2024 14:40:05 +0900 Subject: [PATCH] =?UTF-8?q?[=ED=99=88=20=EC=8A=AC=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=EC=88=98=EC=A0=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 6148 -> 6148 bytes .gitignore | 1 + .../src/features/home/homeSlice.js | 12 +++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.DS_Store b/.DS_Store index 2888ad659cc9c63a989932c4fa6b78e182fa0e41..a29289d1157c2dce11b21c081af19f799b4259ae 100644 GIT binary patch literal 6148 zcmeHKO^ee&7=CA4-HD6Pg9~~P0$xjPmW4&U#F|Asc-e>^RBF>$ji+Jta+GD_}|CF}|OP zQJjewQF6<;1MPiPg4&rf#dTSjOz-0&OUtU?|IBt;?F$!o`7Yn%&%%kQ!z!xgu6yJiE|(79zj5>S$?!!s&BZJAQpB*iDYmQS)Pgf z6j3r`ivmzP`hn7Su&h&Rys}d-9EoWG>q?AeDuTce$v?ii_utp!NA~p*uEt~WoH1ZNYrc2R#%+gd8L$lec?RVE;6f$(1{;lP z>p-Ed0Khi7m7p$v3}lRJ&^OpCJ*u~2NHo+3XB0|Nsi1A_pAVQ_MOZo$MtT}GD4D_M&-%W!bBY;5?; hw3(fQp983VvmnQJ=E?jbhKvl8ZFr { 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