Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 10 additions & 23 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'
import Navbar from '@/components/ui/Navbar'
import ProtectedRoute from '@/components/ProtectedRoute'
import StatusDashboard from '@/components/StatusDashboard'
import Home from '@/components/Home'
import Welcome from '@/components/Welcome'
import StatusDashboard from '@/ui/StatusDashboard'
import Welcome from '@/ui/Welcome'
import {
SignupForm,
SigninForm,
Expand All @@ -12,24 +9,18 @@ import {
NewPassword,
ForgotPassword,
} from '@/features/auth/components'
import AdminDashboard2 from '@/components/dashboards/AdminDashboard2'
import JoinATeam from '@/components/JoinATeam'
import CreateOrJoinTeam from '@/components/CreateOrJoinTeam'
import InterviewerAvailability from '@/components/InterviewerAvailability'
import Dashboard from '@/features/dashboard/Dashboard'
import JoinATeam from '@/features/candidate/components/JoinATeam'
import CreateOrJoinTeam from '@/features/auth/CreateOrJoinTeam'
import Availability from '@/features/dashboard/components/Availability'
import { AuthProvider } from '@/provider/AuthProvider'
import AdminDashboard from '@/components/dashboards/AdminDashboard'
import InterviewerDashboard from '@/components/dashboards/InterviewerDashboard'
import CandidateDashboard from '@/components/dashboards/CandidateDashboard'
import AdminSettings from './components/AdminSettings'

function App() {
return (
<AuthProvider>
<Router>
<Navbar />
<Routes>
<Route path="/" element={<Welcome />} />
<Route path="/home" element={<Home />} />
<Route path="/status" element={<StatusDashboard />} />
<Route path="/signup" element={<SignupForm />} />
<Route path="/signin" element={<SigninForm />} />
Expand All @@ -39,14 +30,10 @@ function App() {
<Route path="/2fa" element={<TwoFactorAuth />} />
<Route path="/new-password" element={<NewPassword />} />
<Route path="/forgot-password" element={<ForgotPassword />} />
<Route path="/interviewer-availability" element={<InterviewerAvailability />} />
<Route path="/admin-settings" element={<AdminSettings />} />

{/* Role-Based Dashboards - Protected */}
<Route path="/admin/dashboard" element={<ProtectedRoute><AdminDashboard /></ProtectedRoute>} />
<Route path="/admin/dashboard2" element={<AdminDashboard2 />} />
<Route path="/interviewer/dashboard" element={<ProtectedRoute><InterviewerDashboard /></ProtectedRoute>} />
<Route path="/candidate/dashboard" element={<ProtectedRoute><CandidateDashboard /></ProtectedRoute>} />
<Route path="/interviewer-availability" element={<Availability />} />

{/* Dashboard */}
<Route path="/dashboard" element={<Dashboard />} />

{/* Catch-all - must be last */}
<Route path="*" element={<Navigate to="/" replace />} />
Expand Down
Loading