import React, { useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import { useDispatch } from 'react-redux'; import { addExperience } from '../../actions/profile'; const AddExperience = () => { const dispatch = useDispatch(); const navigate = useNavigate(); const [formData, setFormData] = useState({ company: '', title: '', location: '', from: '', to: '', current: false, description: '' }); const { company, title, location, from, to, current, description } = formData; const onChange = (e) => setFormData({ ...formData, [e.target.name]: e.target.value }); return (

Add An Experience

Add any developer/programming positions that you have had in the past

* = required field
{ e.preventDefault(); await dispatch(addExperience(formData)).then(() => navigate('/dashboard')); }} >

From Date

{ setFormData({ ...formData, current: !current }); }} />{' '} Current Job

To Date