when using react router v5, I can get the url and path and passed it to child component
In ParentComponent
const { url, path } = useRouteMatch();
<ChildComponent url={url} path={path} title="child" />
In ChildComponent
<Switch>
<Route path={url}>
<div>These will show up</div>
</Route>
</Switch>
In react router v6, I try to reproduce this behavior but its not working
Parent Component
const { pathname } = useLocation();
<ChildComponent url={pathname} path={pathname} title="child" />
Child Component
<Routes>
<Route path={url}>
<div>I want these to show up</div>
</Route>
</Routes>
