diff --git a/src/app/signin/process4/page.tsx b/src/app/signin/process4/page.tsx index 2b92b9b..cc33dea 100644 --- a/src/app/signin/process4/page.tsx +++ b/src/app/signin/process4/page.tsx @@ -27,7 +27,6 @@ const SigninProcess4 = () => { const [checkedItems, setCheckedItems] = useState<{ [key: string]: boolean }>( {} ); - const registerToken = auth.registerToken; const handleCheckboxChange = (item: string) => { setCheckedItems((prev) => ({ ...prev, [item]: !prev[item] })); @@ -49,7 +48,7 @@ const SigninProcess4 = () => { ); const User: PostUserRequest = { - registrationToken: registerToken, + registrationToken: auth.registerToken, agreement: user.agreement, phoneNumber: user.phoneNumber, children: updateChildren, diff --git a/src/redux/slices/authSlice.ts b/src/redux/slices/authSlice.ts index 5313738..b7156a7 100644 --- a/src/redux/slices/authSlice.ts +++ b/src/redux/slices/authSlice.ts @@ -9,14 +9,14 @@ export const authSlice = createSlice({ }, reducers: { setToken: (state, action) => { - state.accessToken = action.payload; - state.refreshToken = action.payload; - state.registerToken = action.payload; + state.accessToken = action.payload.accessToken; + state.refreshToken = action.payload.refreshToken; + state.registerToken = action.payload.registerToken; }, clearToken: (state) => { - accessToken: ""; - refreshToken: ""; - registerToken: ""; + state.accessToken = ""; + state.refreshToken = ""; + state.registerToken = ""; }, }, });