Peter Makowski has proposed merging ~petermakowski/maas-site-manager:redirect-to-sites into maas-site-manager:main.
Commit message: feat: add default redirect to /sites Requested reviews: MAAS Committers (maas-committers) For more details, see: https://code.launchpad.net/~petermakowski/maas-site-manager/+git/site-manager/+merge/438527 -- Your team MAAS Committers is requested to review the proposed merge of ~petermakowski/maas-site-manager:redirect-to-sites into maas-site-manager:main.
diff --git a/frontend/src/router.tsx b/frontend/src/router.tsx index 2a08fdf..399ecc8 100644 --- a/frontend/src/router.tsx +++ b/frontend/src/router.tsx @@ -1,4 +1,4 @@ -import { createBrowserRouter, createRoutesFromElements, Route } from "react-router-dom"; +import { createBrowserRouter, createRoutesFromElements, Route, redirect } from "react-router-dom"; import MainLayout from "./components/MainLayout"; import SitesList from "./pages/sites"; @@ -6,6 +6,11 @@ import SitesList from "./pages/sites"; const router = createBrowserRouter( createRoutesFromElements( <Route element={<MainLayout />} path="/"> + {/* + TODO: redirect to /login when unauthenticated + https://warthogs.atlassian.net/browse/MAASENG-1450 + */} + <Route index loader={() => redirect("sites")} /> <Route path="login" /> <Route path="logout" /> <Route element={<SitesList />} path="sites" />
-- Mailing list: https://launchpad.net/~sts-sponsors Post to : sts-sponsors@lists.launchpad.net Unsubscribe : https://launchpad.net/~sts-sponsors More help : https://help.launchpad.net/ListHelp