const ProfileComponentWrapper = () => { const { username } = useParams(); return <ProfileComponent username={username} />; };
<Route path='/u/:username/' element={<ProfileComponentWrapper />} />