2022-07-26 11:15:36 +02:00
|
|
|
import { OidcSecure } from "@axa-fr/react-oidc";
|
2022-07-26 10:32:11 +02:00
|
|
|
import { FunctionComponent } from "react";
|
|
|
|
import { Route, Routes } from "react-router-dom";
|
|
|
|
import { AboutContainer } from "./features/about/About";
|
|
|
|
import { CounterContainer } from "./features/examples/counter/Counter";
|
2022-07-26 11:15:36 +02:00
|
|
|
import { Tenders } from "./features/examples/tenders/Tenders";
|
2022-07-26 10:32:11 +02:00
|
|
|
import { HomeContainer } from "./features/home/Home";
|
|
|
|
type Props = {};
|
|
|
|
|
|
|
|
export const ROUTE_KEYS = {
|
|
|
|
home: "",
|
|
|
|
about: "about",
|
|
|
|
counter: "counter",
|
2022-07-26 11:15:36 +02:00
|
|
|
tenders: "tenders",
|
2022-07-26 10:32:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export const AppRoutes: FunctionComponent<Props> = () => {
|
2022-07-26 11:15:36 +02:00
|
|
|
const { home, about, counter, tenders } = ROUTE_KEYS;
|
2022-07-26 10:32:11 +02:00
|
|
|
return (
|
|
|
|
<Routes>
|
|
|
|
<Route path={home} element={<HomeContainer />} />
|
|
|
|
<Route path={about} element={<AboutContainer />} />
|
|
|
|
<Route path={counter} element={<CounterContainer />} />
|
2022-07-26 11:15:36 +02:00
|
|
|
{/* a route with authentication */}
|
|
|
|
<Route
|
|
|
|
path={tenders}
|
|
|
|
element={
|
|
|
|
<OidcSecure>
|
|
|
|
<Tenders />
|
|
|
|
</OidcSecure>
|
|
|
|
}
|
|
|
|
/>
|
2022-07-26 10:32:11 +02:00
|
|
|
{/* <Route index element={<Home />} /> */}
|
|
|
|
{/* <Route path="teams" element={<Teams />}>
|
|
|
|
<Route path=":teamId" element={<Team />} />
|
|
|
|
<Route path="new" element={<NewTeamForm />} />
|
|
|
|
<Route index element={<LeagueStandings />} />
|
|
|
|
</Route> */}
|
|
|
|
{/* </Route> */}
|
|
|
|
</Routes>
|
|
|
|
);
|
|
|
|
};
|