I have a problem with nesting routes inside route. User component has tabs and I want to display components based on URLs like this /profile/:userid/about and /profile/:userid/posts and /profile/:userid.
<Routes>
<Route path="/" element={<HomePage/>}/>
<Route path="profile/:username/*" element={<ProfilePage/>}/>
<Route path="login" element={<Login/>}/>
<Route path="register" element={<Register/>}/>
</Routes>
Profile routes
<ProfileContentWrapper className='rightPanel'>
<PorfileTabs/>
<Routes>
<Route path='/about' render={() => <ProfileAbout/>}/>
<Route path='/posts' render={() => <ProfilePosts/>}/>
</Routes>
</ProfileContentWrapper>