Skip to content

Commit

Permalink
fixed install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelaya775 committed May 14, 2022
1 parent 4199bb3 commit 3e145c9
Show file tree
Hide file tree
Showing 25 changed files with 16,448 additions and 60 deletions.
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@mui/icons-material": "^5.5.1",
"@mui/material": "^5.5.3",
"markdown-to-jsx": "^7.1.7",
"peachtree-pasta": "file:..",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-markdown": "^8.0.2",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions client/src/pages/SignIn.js → client/src/pages/SignIn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ export default function SignInSide() {
event.preventDefault()

navigate('/main/pair')
// const data = new FormData(event.currentTarget)
// const options = {
// method: 'GET',
// headers: { 'Content-Type': 'application/json' },
// body: {
// email: data.get('email'),
// password: data.get('password')
// }
// }
const data = new FormData(event.currentTarget)
const options = {
method: 'GET',
headers: { 'Content-Type': 'application/json' },
body: {
email: data.get('email'),
password: data.get('password')
}
}

// fetch('http://localhost:5000/api/mentees/{email}', options)
// .then(res => res.json())
Expand Down
17 changes: 7 additions & 10 deletions client/src/pages/SignUp.js → client/src/pages/SignUp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ export default function SignUp() {
event.preventDefault()
const data = new FormData(event.currentTarget)

console.log(data)
console.log(data.get('firstName'))
console.log(data.get('lastName'))
console.log(data.get('password'))

const options = {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
Expand All @@ -57,11 +52,13 @@ export default function SignUp() {
})
}

fetch('http://localhost:5000/api/mentees', options)
.then(res => res.json())
.then(json => console.log(json))
.then(() => navigate('/main'))
.catch(() => console.log('error has occured while signing in!'))
console.log(options)

// fetch('http://localhost:5000/api/mentees', options)
// .then(res => res.json())
// .then(json => console.log(json))
// .then(() => navigate('/main'))
// .catch(() => console.log('error has occured while signing in!'))
}

return (
Expand Down
Loading

0 comments on commit 3e145c9

Please sign in to comment.