Fix App routes nesting

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-03-14 10:48:30 +04:00
parent 05a0965fa9
commit 7a57ee9b54

View File

@@ -65,7 +65,6 @@ function App() {
<Routes> <Routes>
{/* Authentication Routes - Accessible without login */} {/* Authentication Routes - Accessible without login */}
<Route <Route
path="/login"
element={ element={
<ErrorBoundaryWithLocation> <ErrorBoundaryWithLocation>
<AuthLayout /> <AuthLayout />
@@ -73,7 +72,7 @@ function App() {
} }
> >
<Route <Route
index path="login"
element={ element={
<Suspense> <Suspense>
<ErrorBoundaryWithLocation> <ErrorBoundaryWithLocation>
@@ -82,18 +81,8 @@ function App() {
</Suspense> </Suspense>
} }
/> />
</Route>
<Route <Route
path="/register" path="register"
element={
<ErrorBoundaryWithLocation>
<AuthLayout />
</ErrorBoundaryWithLocation>
}
>
<Route
index
element={ element={
<Suspense> <Suspense>
<ErrorBoundaryWithLocation> <ErrorBoundaryWithLocation>
@@ -102,18 +91,8 @@ function App() {
</Suspense> </Suspense>
} }
/> />
</Route>
<Route <Route
path="/confirm-email" path="confirm-email"
element={
<ErrorBoundaryWithLocation>
<AuthLayout />
</ErrorBoundaryWithLocation>
}
>
<Route
index
element={ element={
<Suspense> <Suspense>
<ErrorBoundaryWithLocation> <ErrorBoundaryWithLocation>
@@ -136,7 +115,6 @@ function App() {
/> />
<Route <Route
path="/organizations/create"
element={ element={
<Suspense> <Suspense>
<ErrorBoundaryWithLocation> <ErrorBoundaryWithLocation>
@@ -145,36 +123,7 @@ function App() {
</Suspense> </Suspense>
} }
> >
<Route <Route path="organizations">
index
element={
<Suspense>
<ErrorBoundaryWithLocation>
<CreateOrganizationPage />
</ErrorBoundaryWithLocation>
</Suspense>
}
/>
</Route>
<Route
path="/organizations/:organizationId/*"
element={
<ErrorBoundaryWithLocation>
<ConsoleLayout />
</ErrorBoundaryWithLocation>
}
>
<Route
index
element={
<Suspense>
<ErrorBoundaryWithLocation>
<HomePage />
</ErrorBoundaryWithLocation>
</Suspense>
}
/>
<Route <Route
path="create" path="create"
element={ element={
@@ -185,6 +134,17 @@ function App() {
</Suspense> </Suspense>
} }
/> />
<Route path=":organizationId">
<Route
index
element={
<Suspense>
<ErrorBoundaryWithLocation>
<HomePage />
</ErrorBoundaryWithLocation>
</Suspense>
}
/>
<Route <Route
path="peoples" path="peoples"
element={ element={
@@ -357,6 +317,9 @@ function App() {
} }
/> />
</Route> </Route>
</Route>
</Route>
<Route <Route
path="*" path="*"
element={ element={