So i have a mern project. The dashboard page on my website is fetching "project" documents from the db and using the map() function displaying the data and an open project button. When a user presses on one of those "open project" buttons, i want to redirect them to another page. Which will display the tickets that have the same id as the project relative to the button the user pressed. But for that, in the new page. I need to know on which project they pressed the button. How do i do that. I can think of a few possible solutions:
- Using react context to make a global variable, on which project they pressed. But that feels super weird and could be a security breach.
- making a page for every "project" document in the database. But i dont know how and if it´s possible since i cant sit and manually create all those pages.
All help is very appreciated, thank you!:)
I haven´t tried any solutions yet, cause i feel like .1 just wont do the job smoothly. and i dont know how to do .2