Skip to content

Commit

Permalink
fix redirect
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <koonpeng@openrobotics.org>
  • Loading branch information
Teo Koon Peng committed Aug 22, 2023
1 parent 298f862 commit b317fd2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/dashboard/src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '@fontsource/roboto/500.css';
import '@fontsource/roboto/700.css';
import React from 'react';
import 'react-grid-layout/css/styles.css';
import { Link, Route, Routes, Navigate } from 'react-router-dom';
import { Route, Routes, Navigate } from 'react-router-dom';
import { LoginPage, PrivateRoute } from 'rmf-auth';
import appConfig from '../app-config';
import ResourceManager from '../managers/resource-manager';
Expand Down Expand Up @@ -131,14 +131,6 @@ export default function App(): JSX.Element | null {
</PrivateRoute>
}
/>
<Route
path={CustomRoute1}
element={
<PrivateRoute unauthorizedComponent={loginRedirect} user={user}>
<Link to={DashboardRoute} />
</PrivateRoute>
}
/>
</Routes>
</AppBase>
</RmfApp>
Expand All @@ -156,7 +148,7 @@ export default function App(): JSX.Element | null {
/>
}
/>
<Route element={<Link to={LoginRoute} />} />
<Route path="*" element={<Navigate to={LoginRoute} />} />
</Routes>
)}
</ResourcesContext.Provider>
Expand Down

0 comments on commit b317fd2

Please sign in to comment.