I am trying to link up a component by a button in another component. I tried this way.
in app.js file
<Route path="/portfolio" element={<Portfolio />}>
<Route path=":id" element={<SingleProject />} />
</Route>
and in the portfolio component,
<Link to={`/portfolio/${dt.id}`} className="text-2xl text-red-100 borde border-coral px-2 block text-center"><i class="fas fa-info-circle" title="Details"></i></Link>
But unfortunately it's not working! every time I clicked on the button, it show me the portfolio component. not specific dynamic page. which should be loaded. How can I fix the problem?