hello I have an error with the React Router routes, mainly it told me that the routes do not match.
I have a route that leads to a component with two other routes and they do not match.
MainRouter
<AuthContext.Provider value={{
user,
setUser
}}>
<BrowserRouter>
<Routes>
<Route path="/" element={ <AppRouter /> }>
</Route>
</Routes>
</BrowserRouter>
</AuthContext.Provider
Routers
<Routes>
<Route path='/profile' element={
<PrivateRoute isAuth={user.logged}>
<ProfileScreen />
</PrivateRoute>
} />
<Route path='/' element={
<PrivateRoute isAuth={user.logged}>
<HomeScreen />
</PrivateRoute>
} />
<Route path="/auth/*" element={
<PublicRoute isAuth={user.logged}>
<AuthRouter setChecking={setChecking} />
</PublicRoute>
} />
<Route path='*' element={<Navigate to='/' />}/>
</Routes>
AuthRouter
<Routes>
<Route path='login' element={<LoginScreen setChecking={setChecking} />} />
<Route path='welcome' element={<WelcomeScreen />} />
<Route path='*' element={<Navigate to='/login' />} />
</Routes>