Closed AlexisTercero55 closed 1 year ago
export const ProfileActions = {
changeProject : 'Profile/Project',
deleteProfile : 'Profile/Delete',
newProfile : 'Profile/newProfile',
}
newProfile
case ProfileActions.newProfile:
newState = [...state,ProfileData(
payload.name,
payload.email,
'https://bootdey.com/img/Content/avatar/avatar4.png',
payload.position,
payload.projectID
)]
return newState;
const handleClose = (e) => {
e?.preventDefault();
if(e)
{
dispatch({
type: ProfileActions.newProfile,
payload: {
name: name,
position: position,
email: mail,
projectID: parseInt(projectID)
}
})
setname('');
setPosition('');
setMail('');
setprojectID('');
}
setShow(false);
}
Annotation on second comment raise issue #15 .
Profiles/newProfile
action.