Hey guys so I've written some code in react which makes it so that when I click on a bar in the graph it takes me to a different page displaying information in a table for that particular skill. It works for all of the skills apart from UX/UI Designer and I think that it's because there is a / in the url and that page doesn't exist. So how can I escape the / when I'm going to that page?.
Here is the code for the route:
<Route
path='/list-demand/:skillname'
element={
<ProtectedRoute>
<DemandInformation />
</ProtectedRoute>
}
/>
Here is the code for the api call :
let url = 'https://localhost:4001/api/demand?selectedSkills=' + skillname
fetch(url, requestObject)
.then((res) => res.json())
.then((response) => {
getData(response)
})
How can I make it work??