-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
김병현
authored and
김병현
committed
Sep 8, 2023
1 parent
ff7d291
commit 5b00216
Showing
5 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// memberInfoSlice.ts | ||
|
||
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; | ||
|
||
interface MemberInfo { | ||
email: string; | ||
name: string; | ||
password: string; | ||
confirmPassword: string; | ||
} | ||
|
||
interface MemberInfoState { | ||
memberInfo: MemberInfo | null; | ||
emailForVerification: string | null; // 이메일 상태 추가 | ||
} | ||
|
||
const initialState: MemberInfoState = { | ||
memberInfo: null, | ||
emailForVerification: null, // 초기값 설정 | ||
}; | ||
|
||
const memberInfoSlice = createSlice({ | ||
name: 'memberInfo', | ||
initialState, | ||
reducers: { | ||
setMemberInfo: (state, action: PayloadAction<MemberInfo>) => { | ||
state.memberInfo = action.payload; | ||
}, | ||
setEmailForVerification: (state, action: PayloadAction<string>) => { | ||
state.emailForVerification = action.payload; // 액션 추가 | ||
}, | ||
}, | ||
}); | ||
|
||
export const { setMemberInfo, setEmailForVerification } = memberInfoSlice.actions; | ||
|
||
export default memberInfoSlice.reducer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters