Begin playing with how/where modes should be wrapped and have data provided
This commit is contained in:
1 parent
4edbb540da
commit
f54fa4cb34
4 files changed
+69
-54
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user