refactor: split frontend application features
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
83d14d23a2
commit
5d7a57fd00
32 changed files with 2563 additions and 2433 deletions
49
frontend/src/app/AuthenticatedApp.tsx
Normal file
49
frontend/src/app/AuthenticatedApp.tsx
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import { useState } from 'react'
|
||||
import { Navigate, Route, Routes } from 'react-router-dom'
|
||||
import { authStorage } from '../api/client'
|
||||
import { AppFooter } from '../components/layout/AppFooter'
|
||||
import { GoGuessHeader } from '../components/layout/GoGuessHeader'
|
||||
import { WorkspaceUtilities } from '../components/layout/WorkspaceUtilities'
|
||||
import { NotFound } from '../components/ui/NotFound'
|
||||
import { CalendarPage, InboxPage, ScheduledInterviewPage } from '../features/interviews'
|
||||
import { CreateJobPage, JobDetailPage, JobsPage } from '../features/jobs'
|
||||
import {
|
||||
CreateParticipantPage,
|
||||
ParticipantDetailPage,
|
||||
ParticipantsPage,
|
||||
} from '../features/participants'
|
||||
import { QuestionLibraryPage, QuestionPage } from '../features/questions'
|
||||
import { ProfilePage, UsersPage } from '../features/users'
|
||||
|
||||
export function AuthenticatedApp({ onLogout }: { onLogout: () => void }) {
|
||||
const [open, setOpen] = useState(false)
|
||||
const user = authStorage.user()
|
||||
return (
|
||||
<div className="app-shell">
|
||||
<GoGuessHeader setOpen={setOpen} open={open} onLogout={onLogout} />
|
||||
<main className="main-content">
|
||||
<WorkspaceUtilities user={user} />
|
||||
<div className="workspace-content">
|
||||
<Routes>
|
||||
<Route index element={<Navigate to="/jobs" replace />} />
|
||||
<Route path="/jobs" element={<JobsPage />} />
|
||||
<Route path="/jobs/new" element={<CreateJobPage />} />
|
||||
<Route path="/jobs/:jobId" element={<JobDetailPage />} />
|
||||
<Route path="/jobs/:jobId/questions/new" element={<QuestionPage />} />
|
||||
<Route path="/questions" element={<QuestionLibraryPage />} />
|
||||
<Route path="/participants" element={<ParticipantsPage />} />
|
||||
<Route path="/participants/new" element={<CreateParticipantPage />} />
|
||||
<Route path="/participants/:participantId" element={<ParticipantDetailPage />} />
|
||||
<Route path="/users" element={<UsersPage />} />
|
||||
<Route path="/profile" element={<ProfilePage />} />
|
||||
<Route path="/inbox" element={<InboxPage />} />
|
||||
<Route path="/calendar" element={<CalendarPage />} />
|
||||
<Route path="/scheduled-interviews/:id" element={<ScheduledInterviewPage />} />
|
||||
<Route path="*" element={<NotFound />} />
|
||||
</Routes>
|
||||
</div>
|
||||
<AppFooter />
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue