mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 13:02:50 +00:00
fixes
This commit is contained in:
@@ -403,6 +403,6 @@ export const router = createBrowserRouter([
|
||||
},
|
||||
|
||||
// A typo'd URL should not maroon a signed-in user on the marketing page —
|
||||
// ProtectedRoute sends anonymous visitors on to /login exactly as before.
|
||||
// ProtectedRoute sends anonymous visitors on to / (landing) instead.
|
||||
{ path: "*", element: <Navigate to="/dashboard" replace /> },
|
||||
]);
|
||||
|
||||
@@ -7,7 +7,7 @@ interface ProtectedRouteProps {
|
||||
loginPath?: string;
|
||||
}
|
||||
|
||||
export function ProtectedRoute({ children, loginPath = '/login' }: ProtectedRouteProps) {
|
||||
export function ProtectedRoute({ children, loginPath = '/' }: ProtectedRouteProps) {
|
||||
const location = useLocation();
|
||||
const token = useAuthToken();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user