Skip to content

Commit 2cc0ec7

Browse files
committed
minor changes ✏️
1 parent f9692aa commit 2cc0ec7

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import spinner from './spinner.gif';
22

3-
export default () => (
3+
const Spinner = () => (
44
<>
55
<img
66
src={spinner}
@@ -9,3 +9,5 @@ export default () => (
99
/>
1010
</>
1111
);
12+
13+
export default Spinner;

client/src/components/profile-form/AddEducation.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ const AddEducation = ({ addEducation }) => {
2020
const { school, degree, fieldofstudy, from, to, current, description } =
2121
formData;
2222

23-
const handleOnChange = (e) =>
24-
setFormData({ ...formData, [e.target.name]: e.target.value });
23+
const handleOnChange = (e) => {
24+
setFormData({
25+
...formData,
26+
[e.target.name]: e.target.value,
27+
});
28+
};
2529

2630
const handleCheckboxOnChange = (e) => {
27-
console.log(e.target.name);
28-
console.log(e.target.checked);
29-
console.log(e.target.value);
3031
setFormData({ ...formData, current: !current });
3132
};
3233

@@ -47,7 +48,7 @@ const AddEducation = ({ addEducation }) => {
4748
<small>* = required field</small>
4849

4950
<form className='form' onSubmit={handleOnSubmit}>
50-
<div class='form-group'>
51+
<div className='form-group'>
5152
<input
5253
type='text'
5354
placeholder='* School or Bootcamp'
@@ -58,7 +59,7 @@ const AddEducation = ({ addEducation }) => {
5859
/>
5960
</div>
6061

61-
<div class='form-group'>
62+
<div className='form-group'>
6263
<input
6364
type='text'
6465
placeholder='* Degree or Certificate'
@@ -69,7 +70,7 @@ const AddEducation = ({ addEducation }) => {
6970
/>
7071
</div>
7172

72-
<div class='form-group'>
73+
<div className='form-group'>
7374
<input
7475
type='text'
7576
placeholder='Field Of Study'

client/src/components/profile-form/AddExperience.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ const AddExperience = ({ addExperience }) => {
2020
const { company, title, location, from, to, current, description } = formData;
2121

2222
const handleOnChange = (e) =>
23-
setFormData({ ...formData, [e.target.name]: e.target.value });
23+
setFormData({
24+
...formData,
25+
[e.target.name]: e.target.value,
26+
});
2427

2528
const handleCheckboxOnChange = (e) => {
26-
console.log(e.target.name);
27-
console.log(e.target.checked);
28-
console.log(e.target.value);
2929
setFormData({ ...formData, current: !current });
3030
};
3131

client/src/components/profile-form/ProfileForm.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { connect } from 'react-redux';
55

66
import { createProfile, getCurrentProfile } from '../../actions/profile';
77

8+
// TODO: Optimize code
89
/*
910
NOTE: declare initialState outside of component
1011
so that it doesn't trigger a useEffect

0 commit comments

Comments
 (0)