feat: New @ohif/viewer project structure + routes (#1674)

* fix pagination size

* clean up, start a very basic route configuration

* quick navigation between routes

* configure webpack to read .env variables

* Move container components to Routes directory

* Fix naming of recipe file

* Clean up source folder

* update yarn.lock

* ci: update netlify deploy preview to build viewer project

* update PWA entrypoint to pass configuration on window to App as props

* fix: for missing key

* Pass routerBasename to our React Router component

* Simplify config for meow

Co-authored-by: dannyrb <danny.ri.brown@gmail.com>
This commit is contained in:
Rodrigo Antinarellianddannyrb authored and James A. Petts committed 2020-05-15 13:57:23 +02:00
1 parent 9a8bede80e
commit 01b314522d
116 files changed
+22080 -4971

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import StudyListContainer from './StudyListContainer';
import NotFound from './NotFound';
const appRoutes = [
{ path: '/', exact: true, component: StudyListContainer },
{ path: '/viewer/:studyInstanceUids', component: NotFound },
{ component: NotFound },
];
const routes = () => {
return (
<Switch>
{appRoutes.map((route, i) => {
return (
<Route
key={i}
path={route.path}
exact={route.exact}
strict={route.strict}
// eslint-disable-next-line react/jsx-props-no-spreading
render={props => <route.component {...props} route={route} />}
/>
);
})}
</Switch>
);
};
export default routes;