I have a component (“list-component” that takes in a list of data and shows that list of data in a custom card (“card-component”).
The list of data can either be a list of hotels, or airbnbs. They have the same attributes, so it doesn’t matter the list type, the card will display it’s relevant data.
I want the user to be able to CLICK the card, and it goes to that list items DETAIL page. The detail pages, differ between the hotel data and airbnb data.
For example a hotel list item should go to “hotel-detail/{id}” and the airbnb list item should go to “airbnb-detail/{id}”.
I am having a hard time figuring out how to pass a dynamic page link that requires an input parameter like “id”. This is challenging since the “card-component” is in a broader “list-component” so I need the “card-component” to dynamically know which page and id to go to.
Any suggestions?