diff --git a/react-ui/build/index.html b/react-ui/build/index.html index 09023139..475a45ca 100644 --- a/react-ui/build/index.html +++ b/react-ui/build/index.html @@ -20,7 +20,7 @@
- + diff --git a/react-ui/src/Components/Contact.js b/react-ui/src/Components/Contact.js index 11622491..25c4db53 100644 --- a/react-ui/src/Components/Contact.js +++ b/react-ui/src/Components/Contact.js @@ -5,24 +5,20 @@ import { contactSubmit } from './services/serverServices' import { getSOTD } from './services/serverServices' const Contact = ({ data }) => { - //if(data) getLatest() + const name = data.name; const city = data.city; const state = data.state; const phone = data.phone; const email = data.email; - const contactMessage = data.contactmessage; + const contactMessage = data.contactmessage; const pic = 'images/' + data.endingpic - + const [newName, setName] = useState('') const [newEmail, setEmail] = useState('') + const [newSubject, setSubject] = useState('') const [newMessage, setMessage] = useState('') - const resetForm = () => { - setName('') - setEmail('') - setMessage('') - } const handleSubmit = (e) => { e.preventDefault() @@ -30,12 +26,19 @@ const Contact = ({ data }) => { const userData = { name: newName, email: newEmail, + subject: newSubject, message: newMessage } - + + const resetForm = () => { + setName('') + setEmail('') + setSubject('') + setMessage('') + } contactSubmit(userData) - .then(data => { - console.log('success submitting data', data); + .then(d => { + console.log('success submitting data', d); resetForm() }) } @@ -47,21 +50,25 @@ const Contact = ({ data }) => { //if matches regex setEmail(event.target.value) } + const handleSubjectChange = (event) => { + setSubject(event.target.value) + } const handleMessageChange = (event) => { setMessage(event.target.value) } + const [song, setSong] = useState(null) + useEffect(() => { + const fetch = async () => { + const songOTD = await getSOTD() + setSong(songOTD) + } + fetch() + }, []) - useEffect(() => { - const fetch = async () => { - const songOTD = await getSOTD() - setSong(songOTD) - } - fetch() - }, []) - if (song === null) { - return

Loading...

- } + if (song === null) { + return

Loading...

+ } return (
@@ -99,12 +106,12 @@ const Contact = ({ data }) => {
- +
- +
@@ -128,21 +135,21 @@ const Contact = ({ data }) => {

Contact Info

- {name} -
+ {name} +
{email} -
+
{city}, {state}
{phone}

- closing portrait + closing portrait +
+
+ album art +
Song of the day:

{song.name} - {song.artist}

-
- album art -
Song of the day:

{song.name} - {song.artist}

-
diff --git a/server/resumeData.json b/server/resumeData.json index 69c8d886..9c4e58de 100644 --- a/server/resumeData.json +++ b/server/resumeData.json @@ -3,9 +3,9 @@ "name":"Alex Wang", "description":"I'm a student at the University of Pittsburgh planning to major in Computer Science and minor in Economics and Philosophy", "image":"raven.JPG", - "bio":"I am looking for a Software Engineering internship position for Summer 2021 that will allow me to continue to further my technical and soft skills and gain some valuable work experience. When I am not coding or doing coursework, I spend my time either lifting, hiking, or cooking. ", + "bio":"I am looking for a Software Engineering internship or research position for Summer 2021 that will allow me to continue to further my technical and soft skills and gain some valuable work experience. When I am not coding or doing coursework, I spend my time either lifting, hiking, or cooking. ", "contactmessage":"Send me a message, I'll get back to you within 24 hours", - "email": "alw245@pitt.edu or alexwang24@pm.me", + "email": "alw245@pitt.edu", "city": "Pittsburgh", "state": "PA", "phone": "724-986-8135",