Files
Frontend/src/app/providers/routing.tsx
T

44 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Suspense } from "react";
import { Routes as ReactRoutes, Route } from "react-router-dom";
import { HomePage } from "@/pages/home.page";
import { SecondaryPage } from "@/pages/secondary.page";
import { AuthPage } from "@/pages/AuthPage";
import { CreateOrganizationPage } from "@/pages/CreateOrganizationPage";
import { ProtectedRoute } from "./helper/protected.route";
export const Routing = () => {
return (
<Suspense
fallback={
<div className="flex items-center justify-center min-h-screen">
Загрузка...
</div>
}
>
<ReactRoutes>
<Route path="/" element={<AuthPage />} />
<Route
path="/create-organization"
element={<CreateOrganizationPage />}
/>
<Route
path="/home"
element={
<ProtectedRoute>
<HomePage />
</ProtectedRoute>
}
/>
<Route
path="/secondary"
element={
<ProtectedRoute>
<SecondaryPage />
</ProtectedRoute>
}
/>
</ReactRoutes>
</Suspense>
);
};