Skip to content

Commit

Permalink
Merge pull request #53 from LaurierCS/Chris/Fix-preferences-bug
Browse files Browse the repository at this point in the history
Fix navigation bug
  • Loading branch information
ctlchan authored Nov 30, 2023
2 parents 3debdba + 8686383 commit c8e853a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions web/meetup-facilitator/src/pages/Preferences.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ function Preferences() {
const location = locationPrefs.current;

const time = timePrefs.current.flat();
console.log({time})

console.log({activities, location, time});

if (activities.length === 0 || Object.keys(location).length === 0 || time.length === 0)
alert("Please make sure at least one option is chosen for every preference.")

Expand All @@ -86,13 +84,12 @@ function Preferences() {
.then((response) => {
if ("status" in response && response["status"] === 201) {
alert("Preferences successfully saved. Redirecting to Recommendations.")
navigate(`/recommendations/${localStorage.getItem("email")}`);
navigate(`/recommendations/${group_id}`);
} else
alert("There was an issue saving preferences. Please try again.");
})

}
navigate(`/recommendations/${group_id}/`);

}

Expand Down

0 comments on commit c8e853a

Please sign in to comment.