Begin playing with how/where modes should be wrapped and have data provided

This commit is contained in:
dannyrb authored and James A. Petts committed 2020-05-15 14:00:07 +02:00
1 parent 4edbb540da
commit f54fa4cb34
4 files changed
+69 -54

No files matched your search

+7 -5
View File
@@ -5,16 +5,18 @@ import { Switch, Route } from 'react-router-dom';
import StudyListContainer from './StudyListContainer';
import NotFound from './NotFound';
const appRoutes = [
const bakedInRoutes = [
{ path: '/', exact: true, component: StudyListContainer },
{ path: '/viewer/:studyInstanceUids', component: NotFound },
{ component: NotFound },
];
const routes = () => {
const createRoutes = routes => {
console.log('Creating Routes: ', routes, bakedInRoutes);
const allRoutes = [...(routes || []), ...bakedInRoutes];
return (
<Switch>
{appRoutes.map((route, i) => {
{allRoutes.map((route, i) => {
return (
<Route
key={i}
@@ -30,4 +32,4 @@ const routes = () => {
);
};
export default routes;
export default createRoutes;