This commit is contained in:
nikita
2026-06-12 00:54:50 +03:00
parent c8bc9b8347
commit da9da0971f
11 changed files with 158 additions and 160 deletions
+32
View File
@@ -0,0 +1,32 @@
import { Suspense } from "react";
import { HomePage } from "@/pages/home.page";
import { SecondaryPage } from "@/pages/secondary.page";
import { ProtectedRoute } from "./helper/protected.route";
import { Routes as ReactRoutes, Route } from "react-router-dom";
export const Routing = () => {
return (
<Suspense
fallback={
<div className="flex items-center justify-center min-h-screen">
Загрузка...
</div>
}
>
<ReactRoutes>
<Route path="/home" element={<HomePage />} />
<Route>
<Route
path="/secondary"
element={
<ProtectedRoute>
<SecondaryPage />
</ProtectedRoute>
}
/>
</Route>
</ReactRoutes>
</Suspense>
);
};