Skip to content

Commit

Permalink
OV-9: * format correction
Browse files Browse the repository at this point in the history
  • Loading branch information
XCODE89 committed Aug 20, 2024
1 parent 06fa3f6 commit d32bc9f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
1 change: 0 additions & 1 deletion frontend/src/router/components/protected-route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const ProtectedRoute: React.FC = () => {
if (dataStatus !== DataStatus.FULFILLED) {
return <Navigate to={AppRoute.SIGN_IN} replace />;
}

return <RouterOutlet />;
};

Expand Down
22 changes: 10 additions & 12 deletions frontend/src/router/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import { AppRoute } from '~/bundles/common/enums/app-route.enum.js';
import { protectedRoutes } from './routes/protected-routes.js';
import { publicRoutes } from './routes/public-routes.js';

const routes = [
{
path: AppRoute.ROOT,
element: <App />,
children: [
protectedRoutes,
...publicRoutes,
],
},
];

export { routes };
const routes = [{
path: AppRoute.ROOT,
element: <App />,
children: [
protectedRoutes,
...publicRoutes,
],
}];

export { routes };

8 changes: 4 additions & 4 deletions frontend/src/router/routes/protected-routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const protectedRoutes = {
children: [
//TODO Add protected routes here in element property and specify the correct path
{
path: AppRoute.PROTECTED,
element: (<div>test</div>)
path: AppRoute.PROTECTED,
element: (<div>test</div>)
},
{
path: AppRoute.ANY,
element: <Navigate to={AppRoute.ROOT} />
path: AppRoute.ANY,
element: <Navigate to={AppRoute.ROOT} />
},
]
};
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/router/routes/public-routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import { AppRoute } from '~/bundles/common/enums/app-route.enum.js';
const publicRoutes = [
{
path: AppRoute.SIGN_IN,
element: <Auth />,
element: <Auth />
},
{
path: AppRoute.SIGN_UP,
element: <Auth />,
element: <Auth />
},
{
path: AppRoute.ANY,
element: <Navigate to={AppRoute.SIGN_IN} />,
element: <Navigate to={AppRoute.SIGN_IN} />
}
];

export { publicRoutes };
export { publicRoutes };

0 comments on commit d32bc9f

Please sign in to comment.