diff --git a/src/frontend/src/routes.tsx b/src/frontend/src/routes.tsx index 1ef18f3c6..e78e0f489 100644 --- a/src/frontend/src/routes.tsx +++ b/src/frontend/src/routes.tsx @@ -1,4 +1,4 @@ -import { Route, Routes } from "react-router-dom"; +import { Route, Routes, useNavigate } from "react-router-dom"; import { ProtectedAdminRoute } from "./components/authAdminGuard"; import { ProtectedRoute } from "./components/authGuard"; import { ProtectedLoginRoute } from "./components/authLoginGuard"; @@ -19,6 +19,13 @@ import LoginPage from "./pages/loginPage"; import SignUp from "./pages/signUpPage"; const Router = () => { + const navigate = useNavigate(); + + // Redirect from root to /flows + if (window.location.pathname === "/") { + navigate("/flows"); + } + return (