Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnelson98 committed Jun 10, 2024
1 parent 241a3df commit 2d788fe
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions client/src/pages/EditProfilePage/EditProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const EditProfilePage = () => {
skills: string[];
specializations: string[];
};

const [formData, setFormData] = useState<FormDataType>({
email: '',
nickName: '',
Expand Down Expand Up @@ -70,19 +70,18 @@ const EditProfilePage = () => {
twitter: profile.socialMediaLinks?.twitter || '',
blog: profile.socialMediaLinks?.blog || '',
skills: profile.skills || [],
specializations: profile.specializations || [],
specializations: profile.specializations || [],
});
}
}, [profile]);

const handleChange = (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
const { name, value } = e.target;
setFormData((prevFormData) => ({
...prevFormData,
[name]: value,
}));
}

setFormData((prevFormData) => ({
...prevFormData,
[name]: value,
}));
};

const handleSkillChange = (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
setSkillInput(e.target.value);
Expand Down Expand Up @@ -118,7 +117,7 @@ const EditProfilePage = () => {
}
};

const handleSpecialization = (skill: string) => {
const handleSpecialization = (skill: string) => {
if (!formData.specializations.includes(skill)) {
setFormData((prevData) => ({
...prevData,
Expand Down

0 comments on commit 2d788fe

Please sign in to comment.