I want to have slightly different content on a page or just different data lists, depending on what the user clicked on the previous page. So if I have two buttons: Friends and Nearby. I want to have the same page in both options, but different data. Like Option 1: The Friends Data and Option 2: The Data nearby. I don't want to make an additional page for every option since the html content would be almost the same. I actually have no idea of how to do it. But I have put below some code of how I imagined the logic, since I want to control it with bools.
if (route === friends.clicked) {
this.friends = true;
}
if (route === nearby.clicked) {
this.nearby = true;
}