I'm developing an application where I need two kinds of navigation bars. Well, the only thing that is going to be changing are the tabs. I have tried implementing it multiple ways, but nothing worked correctly (The problem is in routing)
Since the navbar gets rendered at top level, it doesn't have access to useRouteMatch url (it does, but it's always /), so I cannot figure out how to route correctly.
Example route:
mypage.com/events/eventId/nested_route1
But when I try to navigate to a different tab, it doesn't work as intended. It either pushes the routes onto each other or just doesn't work in some other way.
But i need just mypage.com/events/eventId as the base url. The navigation used to be in a component with exactly this route, so it worked. But now I need to change the location as specified.
How could I do this? I really have no clue... I could split and pop the url to get rid of the url, but then there'd be a problem if I was on the url mypage.com/events/eventId since it would pop the id.
Hope everything's clear and there's a way to solve my problem.