How to parse API endpoint to a modal

Hello, I wondered if anyone can give me some pointers here, please? I think I am close but have not had that eureka moment yet.

I am using sheety to convert a google sheet into a JSON api. This sheet has two tabs. One contains a list of courses (api endpoint /courses) and the other a list of training companies (api endpoint /trainer). The company name is unique.

I based my first page on your unsplash tutorial but in my case, I have the list of trainers, logos etc pulled in from the API in a repeat row. (screenshot 1).

In the card, I have a calendar button which opens a model. In this modal, I have linked the sheety API for the courses endpoint. Currently, this runs and displays all course data.

What I want to do is only display the courses related to the trainer selected so if the card is Company ABC, the listing in the modal will only relate to them. I need some way of making the button pass the endpoint to the modal and use that, like
/trainingCalendar/courses?company=Company ABC

Of course, I may be missing the obvious on account of looking at it for too long…

Thanks and best regards,
Brian

Community Page
Last updated: