-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSVP routed #26
base: main
Are you sure you want to change the base?
RSVP routed #26
Conversation
Frontendtouchup
Just as an FYI - This was my first chance to really dive into the code you all have been writing and I didn't realize you were using React Router, as I saw the window calls today, but not the import { useHistory } from 'react-router-dom';
const componentName = () => {
const history = useHistory();
const handleRouteChange = () => history.push('/newPageRoute');
return <button onClick={() => handleRouteChange()}>Change route</button>
}
export default componentName; |
views/js/evently/src/ViewEvent.jsx
Outdated
@@ -51,7 +50,11 @@ function ViewEvent() { | |||
<div className="image-container"> | |||
<img src={placeholder} className="image"></img> | |||
<br></br> | |||
<button className="rsvp-button"> | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see a merge conflict here - so just delete lines 55-57 (and the <<<<<<< HEAD
line) and you should be good to go!
views/js/evently/src/RSVP.jsx
Outdated
<select className="dropdown"> | ||
|
||
<select value={RSVP} onChange={(e) => setRSVP(e.target.value)} className="dropdown"> | ||
<option></option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be a no
in between these option tags?
views/js/evently/src/RSVP.jsx
Outdated
try { | ||
var res = await fetch(`http://localhost:3000/api/event/${event_id}/rsvp`, { | ||
method: "POST", | ||
//headers: { 'Content-Type': 'application/json' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we don't need this header so you can just delete this line!
views/js/evently/src/RSVP.jsx
Outdated
event_id: parseInt(event_id) , name: ResponderName, rsvp: RSVP | ||
}), | ||
}); | ||
console.log(res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get rid of this console.log()!
RSVP page adds to table and reroutes back to homepage