Skip to content

Commit

Permalink
amended front end to use relative routes
Browse files Browse the repository at this point in the history
  • Loading branch information
GalexyN committed Jun 22, 2021
1 parent 94aead0 commit 6be0710
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
8 changes: 4 additions & 4 deletions client/components/ReviewsComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ReviewsComponent extends React.Component {
}


fetch(`http://localhost:3007/api/userReviews/${Id}`)
fetch(`/api/userReviews/${Id}`)
.then(response => response.json())
.then(data => {
if (this._isMounted) {
Expand All @@ -70,7 +70,7 @@ class ReviewsComponent extends React.Component {
})
.catch(error => console.log(error));

fetch(`http://localhost:3007/api/totalReviewScore/${Id}`)
fetch(`/api/totalReviewScore/${Id}`)
.then(response => response.json())
.then(data => {
if (this._isMounted) {
Expand All @@ -80,7 +80,7 @@ class ReviewsComponent extends React.Component {
})
.catch(error => console.log(error));

fetch(`http://localhost:3007/api/getTitle/${Id}`)
fetch(`/api/getTitle/${Id}`)
.then(response => response.json())
.then(data => {
var courseTitle = `TOP REVIEWS FROM ${data.toUpperCase()}`;
Expand All @@ -100,7 +100,7 @@ class ReviewsComponent extends React.Component {
}

render() {
console.log('total review data:', this.state.totalReviewScore)
// console.log('total review data:', this.state.totalReviewScore)
return (
<div className="rev-module">
<h2 className="rev-label">Reviews</h2>
Expand Down
Loading

0 comments on commit 6be0710

Please sign in to comment.