Try to fix standalone routing
This commit is contained in:
parent
2082d46a57
commit
59b7c951df
104
Packages-react/ohif-viewer/dist/index.es.js
vendored
104
Packages-react/ohif-viewer/dist/index.es.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
104
Packages-react/ohif-viewer/dist/index.js
vendored
104
Packages-react/ohif-viewer/dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
Packages-react/ohif-viewer/dist/index.js.map
vendored
2
Packages-react/ohif-viewer/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
104
Packages-react/ohif-viewer/dist/index.umd.js
vendored
104
Packages-react/ohif-viewer/dist/index.umd.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -51,14 +51,17 @@
|
||||
|
||||
window.process = process;
|
||||
</script>
|
||||
<script src="https://unpkg.com/ohif-viewer@0.0.2/dist/index.umd.js" crossorigin></script>
|
||||
<script src="https://unpkg.com/ohif-viewer/dist/index.umd.js" crossorigin></script>
|
||||
<!--<script src="http://localhost:3000/dist/index.umd.js" crossorigin></script>!-->
|
||||
|
||||
<!-- Load our React component. -->
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
// TODO: Add viewer config here
|
||||
var props = {};
|
||||
var props = {
|
||||
routerBasename: window.location.pathname
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ohif-viewer",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
|
||||
@ -136,11 +136,15 @@ OHIF.utils.addServers(servers, store);
|
||||
window.store = store;
|
||||
|
||||
class App extends Component {
|
||||
static propTypes = {
|
||||
routerBasename: PropTypes.string
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Provider store={store}>
|
||||
{/*<OidcProvider store={store} userManager={userManager}>*/}
|
||||
<BrowserRouter basename={props.routerBasename}>
|
||||
<BrowserRouter basename={this.props.routerBasename}>
|
||||
<OHIFStandaloneViewer/>
|
||||
</BrowserRouter>
|
||||
{/*</OidcProvider>*/}
|
||||
|
||||
@ -34,7 +34,7 @@ OHIF.external.cornerstoneMath = cornerstoneMath;
|
||||
OHIF.external.cornerstoneWADOImageLoader = cornerstoneWADOImageLoader;
|
||||
|
||||
// TODO: Is there a better way to guess ROOT_URL?
|
||||
let ROOT_URL = homepage;
|
||||
let ROOT_URL = window.location.pathname;
|
||||
|
||||
// If the page we are on is not a subset of the expected homepage
|
||||
// provided in the package.json file, we might be doing local development.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user