feat: allow public monitor route without login and add monitor page
This commit is contained in:
13
src/App.tsx
13
src/App.tsx
@@ -13,6 +13,7 @@ import ProjectDetailPage from '@/pages/ProjectDetailPage'
|
||||
import MilestonesPage from '@/pages/MilestonesPage'
|
||||
import MilestoneDetailPage from '@/pages/MilestoneDetailPage'
|
||||
import NotificationsPage from '@/pages/NotificationsPage'
|
||||
import MonitorPage from '@/pages/MonitorPage'
|
||||
import axios from 'axios'
|
||||
|
||||
const WIZARD_PORT = Number(import.meta.env.VITE_WIZARD_PORT) || 18080
|
||||
@@ -61,7 +62,16 @@ export default function App() {
|
||||
if (!user) {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<LoginPage onLogin={login} />
|
||||
<div className="app-layout">
|
||||
<Sidebar user={null} onLogout={logout} />
|
||||
<main className="main-content">
|
||||
<Routes>
|
||||
<Route path="/monitor" element={<MonitorPage />} />
|
||||
<Route path="/login" element={<LoginPage onLogin={login} />} />
|
||||
<Route path="*" element={<Navigate to="/monitor" />} />
|
||||
</Routes>
|
||||
</main>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
)
|
||||
}
|
||||
@@ -81,6 +91,7 @@ export default function App() {
|
||||
<Route path="/milestones" element={<MilestonesPage />} />
|
||||
<Route path="/milestones/:id" element={<MilestoneDetailPage />} />
|
||||
<Route path="/notifications" element={<NotificationsPage />} />
|
||||
<Route path="/monitor" element={<MonitorPage />} />
|
||||
<Route path="*" element={<Navigate to="/" />} />
|
||||
</Routes>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user