Skip to content

Commit 7b19e57

Browse files
committed
Add date in itinerary params for util url
1 parent a4d6be7 commit 7b19e57

File tree

6 files changed

+139
-406
lines changed

6 files changed

+139
-406
lines changed

‎client/frontend/components/IndexPage.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class IndexPage extends React.Component {
2020
}
2121

2222
componentDidMount(){
23+
console.log(this.props.itineraryParams);
2324
this.props.fetchItinerary(this.props.itineraryParams);
2425
}
2526

‎client/frontend/components/ShowPage.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ShowPage extends React.Component {
4141
parseDate(time) {
4242
// '2018-04-29T19:26:00.000Z'
4343
// '2018-04-29T20:26:00.000Z'
44-
return "${this.props.date}T${time}.000Z";
44+
return `${this.props.date}T${time}.000Z`;
4545
}
4646

4747
submit(){

‎client/frontend/util/ItineraryUtil.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const fetchItinerary = (itinerary) => {
2-
let url = `http://localhost:3000/api/itineraries/getitinerary?lat=${itinerary.lat}&lon=${itinerary.lon}&bars=${itinerary.bars}&restaurants=${itinerary.restaurants}&nature=${itinerary.nature}&arts=${itinerary.arts}`;
2+
let url = `http://localhost:3000/api/itineraries/getitinerary?lat=${itinerary.lat}&lon=${itinerary.lon}&date=${itinerary.date}&bars=${itinerary.bars}&restaurants=${itinerary.restaurants}&nature=${itinerary.nature}&arts=${itinerary.arts}`;
33
return fetch(url, {
44
method: 'GET',
55
}).then(response => {

0 commit comments

Comments
 (0)