We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// PrivateRoute.js import useAuth from "hooks/useAuth"; import { Outlet, Navigate } from "react-router-dom"; const PrivateRoute = () => { const auth = useAuth(); return auth ? <Outlet /> : <Navigate to="/page-not-found" />; }; // Routes.js <Route path="/dashboard" element={<PrivateRoute />}> <WithLayoutDashboard component={Account} layout={AppLayout} /> </Route>
This code doesn't render my outlet component. How can I fix it? And why did happen?
The text was updated successfully, but these errors were encountered:
#8111 (comment)
and
#8092 (comment)
Sorry, something went wrong.
No branches or pull requests
This code doesn't render my outlet component. How can I fix it? And why did happen?
The text was updated successfully, but these errors were encountered: