adding skills to experiences, profiles, and projects
This commit is contained in:
@@ -7,13 +7,15 @@ type Action =
|
||||
| { type: 'SET_IS_DISABLED'; payload: boolean }
|
||||
| { type: 'SET_IS_LOADING'; payload: boolean }
|
||||
| { type: 'SET_PROFILE_OPTIONS'; payload: Profile[] }
|
||||
| { type: 'SET_SKILL_OPTIONS'; payload: Skill[] | undefined };
|
||||
| { type: 'SET_SELECTED_SKILLS'; payload: Skill[] }
|
||||
| { type: 'SET_SKILL_OPTIONS'; payload: Skill[] };
|
||||
|
||||
export const initialState: ExperienceFormState = {
|
||||
error: undefined,
|
||||
isDisabled: false,
|
||||
isLoading: true,
|
||||
profileOptions: [],
|
||||
selectedSkills: [],
|
||||
skillOptions: []
|
||||
};
|
||||
|
||||
@@ -46,6 +48,12 @@ export const reducer = (
|
||||
profileOptions: action.payload
|
||||
}
|
||||
}
|
||||
case 'SET_SELECTED_SKILLS': {
|
||||
return {
|
||||
...state,
|
||||
selectedSkills: action.payload
|
||||
}
|
||||
}
|
||||
case 'SET_SKILL_OPTIONS': {
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user