In nested React routing with search params, when I am on /app and after clicking on Link which navigates to /app/user. Navigation is not working.
If I am trying it without nesting, it is working but. But why it is not working when I am nesting it.
Codesandbox: CodeSandBox Link
<Routes>
<Route path="/" element={<LandingPage />} />
<Route path="/app" element={<Main />}>
<Route path=":user" element={<User />} />
</Route>
<Route path="*" element={<PageNotFound />} />
</Routes>