Skip to content

Commit

Permalink
minor changes ✏️
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugilan-Codes committed Nov 27, 2021
1 parent f9692aa commit 2cc0ec7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 3 additions & 1 deletion client/src/components/layout/Spinner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import spinner from './spinner.gif';

export default () => (
const Spinner = () => (
<>
<img
src={spinner}
Expand All @@ -9,3 +9,5 @@ export default () => (
/>
</>
);

export default Spinner;
17 changes: 9 additions & 8 deletions client/src/components/profile-form/AddEducation.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ const AddEducation = ({ addEducation }) => {
const { school, degree, fieldofstudy, from, to, current, description } =
formData;

const handleOnChange = (e) =>
setFormData({ ...formData, [e.target.name]: e.target.value });
const handleOnChange = (e) => {
setFormData({
...formData,
[e.target.name]: e.target.value,
});
};

const handleCheckboxOnChange = (e) => {
console.log(e.target.name);
console.log(e.target.checked);
console.log(e.target.value);
setFormData({ ...formData, current: !current });
};

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

<form className='form' onSubmit={handleOnSubmit}>
<div class='form-group'>
<div className='form-group'>
<input
type='text'
placeholder='* School or Bootcamp'
Expand All @@ -58,7 +59,7 @@ const AddEducation = ({ addEducation }) => {
/>
</div>

<div class='form-group'>
<div className='form-group'>
<input
type='text'
placeholder='* Degree or Certificate'
Expand All @@ -69,7 +70,7 @@ const AddEducation = ({ addEducation }) => {
/>
</div>

<div class='form-group'>
<div className='form-group'>
<input
type='text'
placeholder='Field Of Study'
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/profile-form/AddExperience.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const AddExperience = ({ addExperience }) => {
const { company, title, location, from, to, current, description } = formData;

const handleOnChange = (e) =>
setFormData({ ...formData, [e.target.name]: e.target.value });
setFormData({
...formData,
[e.target.name]: e.target.value,
});

const handleCheckboxOnChange = (e) => {
console.log(e.target.name);
console.log(e.target.checked);
console.log(e.target.value);
setFormData({ ...formData, current: !current });
};

Expand Down
1 change: 1 addition & 0 deletions client/src/components/profile-form/ProfileForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { connect } from 'react-redux';

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

// TODO: Optimize code
/*
NOTE: declare initialState outside of component
so that it doesn't trigger a useEffect
Expand Down

1 comment on commit 2cc0ec7

@SaiTejaKaragalla
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sir can i use it for my miniproject

Please sign in to comment.