From 3e913e64007e7f11188f69351bf25e005d6fa260 Mon Sep 17 00:00:00 2001 From: Adham Elias Botrous <50738429+Adham-Elias-Botours@users.noreply.github.com> Date: Tue, 19 Nov 2019 21:11:19 +0100 Subject: [PATCH 1/8] fix typo mistake --- .../components/profile-forms/CreateProfile.js | 204 +++++++++--------- 1 file changed, 101 insertions(+), 103 deletions(-) diff --git a/client/src/components/profile-forms/CreateProfile.js b/client/src/components/profile-forms/CreateProfile.js index 22f1d37..8e4e95c 100755 --- a/client/src/components/profile-forms/CreateProfile.js +++ b/client/src/components/profile-forms/CreateProfile.js @@ -1,28 +1,28 @@ -import React, { useEffect, useState, Fragment } from "react"; -import { Link, withRouter, Redirect } from "react-router-dom"; -import PropTypes from "prop-types"; -import { connect } from "react-redux"; -import { createProfile, getCurrentProfile } from "../../actions/profile"; +import React, { useEffect, useState, Fragment } from 'react'; +import { Link, withRouter, Redirect } from 'react-router-dom'; +import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; +import { createProfile, getCurrentProfile } from '../../actions/profile'; -const Createprofile = ({ +const CreateProfile = ({ createProfile, getCurrentProfile, profile: { profile, loading }, - history, + history }) => { const [formData, setFormData] = useState({ - company: "", - website: "", - location: "", - status: "", - skills: "", - githubusername: "", - bio: "", - twitter: "", - facebook: "", - linkedin: "", - youtube: "", - instagram: "", + company: '', + website: '', + location: '', + status: '', + skills: '', + githubusername: '', + bio: '', + twitter: '', + facebook: '', + linkedin: '', + youtube: '', + instagram: '' }); const [displaySocialInputs, toggleSocialInputs] = useState(false); const { @@ -37,7 +37,7 @@ const Createprofile = ({ facebook, linkedin, youtube, - instagram, + instagram } = formData; const onChange = e => setFormData({ ...formData, [e.target.name]: e.target.value }); @@ -50,165 +50,164 @@ const Createprofile = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [getCurrentProfile]); return loading && profile === null ? ( - + ) : ( -

Create Your Profile

-

- Let's get some information to make your +

Create Your Profile

+

+ Let's get some information to make your profile stand out

* = required field -
onSubmit(e)}> -
- onChange(e)}> + + + + + + + + + - + Give us an idea of where you are at in your career
-
+
onChange(e)} /> - + Could be your own company or one you work for
-
+
onChange(e)} /> - + Could be your own or a company website
-
+
onChange(e)} /> - + City & state suggested (eg. Boston, MA)
-
+
onChange(e)} /> - + Please use comma separated values (eg. HTML,CSS,JavaScript,PHP)
-
+
onChange(e)} /> - + If you want your latest repos and a Github link, include your username
-
+