feat(frontend): add cabinet shells, brand tokens, and state primitives
This commit is contained in:
1 parent
dda3825786
commit
0e2a3b02ab
85 files changed
+3313
-113
No files matched your search
@@ -0,0 +1,89 @@
|
||||
import { redirect, type RouteObject } from "react-router-dom";
|
||||
import { NotFoundPage } from "../../pages/not-found";
|
||||
import { PlaceholderPage } from "../../pages/placeholder";
|
||||
import { StatusPage } from "../../pages/status";
|
||||
import { WelcomePage } from "../../pages/welcome";
|
||||
import { paths } from "../../shared/config";
|
||||
import { CandidateShell } from "../../widgets/candidate-shell";
|
||||
import { EmployerShell } from "../../widgets/employer-shell";
|
||||
import { PublicShell } from "../../widgets/public-shell";
|
||||
import { RootLayout } from "../ui/root-layout";
|
||||
import { RouteErrorPage } from "../ui/route-error-page";
|
||||
|
||||
/**
|
||||
* Route tree with three groups: public pages, the candidate cabinet, and the
|
||||
* employer cabinet. Each group has its own shell and its own not-found page.
|
||||
* Access control is not implemented yet; the server will enforce it.
|
||||
*/
|
||||
export const routes: RouteObject[] = [
|
||||
{
|
||||
element: <RootLayout />,
|
||||
errorElement: <RouteErrorPage />,
|
||||
children: [
|
||||
{
|
||||
element: <PublicShell />,
|
||||
children: [
|
||||
{ index: true, element: <WelcomePage /> },
|
||||
{ path: paths.login, element: <PlaceholderPage screen="login" /> },
|
||||
{ path: paths.register, element: <PlaceholderPage screen="register" /> },
|
||||
{ path: paths.verifyEmail, element: <PlaceholderPage screen="verifyEmail" /> },
|
||||
{ path: paths.support, element: <PlaceholderPage screen="support" /> },
|
||||
{ path: paths.status, element: <StatusPage /> },
|
||||
{ path: "*", element: <NotFoundPage /> },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: paths.candidate.root,
|
||||
element: <CandidateShell />,
|
||||
children: [
|
||||
{ index: true, element: <PlaceholderPage screen="candidateHome" /> },
|
||||
{
|
||||
path: paths.candidate.onboarding,
|
||||
element: <PlaceholderPage screen="candidateOnboarding" />,
|
||||
},
|
||||
{ path: paths.candidate.profile, element: <PlaceholderPage screen="candidateProfile" /> },
|
||||
{
|
||||
path: paths.candidate.assessment,
|
||||
element: <PlaceholderPage screen="candidateAssessment" />,
|
||||
},
|
||||
{ path: paths.candidate.results, element: <PlaceholderPage screen="candidateResults" /> },
|
||||
{
|
||||
path: paths.candidate.invitations,
|
||||
element: <PlaceholderPage screen="candidateInvitations" />,
|
||||
},
|
||||
{ path: paths.candidate.privacy, element: <PlaceholderPage screen="candidatePrivacy" /> },
|
||||
{
|
||||
path: "*",
|
||||
element: (
|
||||
<NotFoundPage homePath={paths.candidate.root} homeLabel="В кабинет кандидата" />
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: paths.employer.root,
|
||||
element: <EmployerShell />,
|
||||
children: [
|
||||
// The employer flow starts with the company profile.
|
||||
{ index: true, loader: () => redirect(paths.employer.company) },
|
||||
{ path: paths.employer.company, element: <PlaceholderPage screen="employerCompany" /> },
|
||||
{ path: paths.employer.needs, element: <PlaceholderPage screen="employerNeeds" /> },
|
||||
{
|
||||
path: paths.employer.candidates,
|
||||
element: <PlaceholderPage screen="employerCandidates" />,
|
||||
},
|
||||
{
|
||||
path: paths.employer.invitations,
|
||||
element: <PlaceholderPage screen="employerInvitations" />,
|
||||
},
|
||||
{
|
||||
path: "*",
|
||||
element: (
|
||||
<NotFoundPage homePath={paths.employer.company} homeLabel="В кабинет работодателя" />
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
Reference in new issue
Block a user