Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #201 from swarmion/feat/prevent_front_circular_dep
Browse files Browse the repository at this point in the history
refactor: move RoutePaths definition
  • Loading branch information
fargito authored Jun 14, 2022
2 parents 68dc210 + d2cf848 commit 94b2dff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/app/src/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { BrowserRouter, Route, Routes } from 'react-router-dom';

import { NotFound } from '@swarmion-starter/frontend-shared';

const Home = React.lazy(() => import('pages/Home/Home'));
import { RoutePaths } from 'types';

export enum RoutePaths {
HOME_PAGE = '/',
}
const Home = React.lazy(() => import('pages/Home/Home'));

const AppRoutes = (): JSX.Element => (
<Suspense fallback={NotFound}>
Expand Down
4 changes: 4 additions & 0 deletions frontend/app/src/types/RoutePaths.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// RoutePaths is defined here and not in AppRoutes.tsx to prevent circular dependencies
export enum RoutePaths {
HOME_PAGE = '/',
}
1 change: 1 addition & 0 deletions frontend/app/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { RoutePaths } from './RoutePaths';

0 comments on commit 94b2dff

Please sign in to comment.