Make sure our baseDirectory ends in a forward slash
This commit is contained in:
parent
f583af0f20
commit
2cbeb26eb4
@ -3,7 +3,7 @@ import { ToolbarSection } from 'react-viewerbase';
|
|||||||
import OHIF from 'ohif-core';
|
import OHIF from 'ohif-core';
|
||||||
|
|
||||||
const { setToolActive } = OHIF.redux.actions;
|
const { setToolActive } = OHIF.redux.actions;
|
||||||
const Icons = `${window.config.routerBasename}icons.svg`;
|
const Icons = `${window.config.routerBasename}/icons.svg`;
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
const activeButton = state.tools.buttons.find(tool => tool.active === true);
|
const activeButton = state.tools.buttons.find(tool => tool.active === true);
|
||||||
|
|||||||
@ -47,14 +47,3 @@ export ROOT_URL=$DEPLOY_PRIME_URL/demo
|
|||||||
mkdir ./docs/latest/_book/demo/
|
mkdir ./docs/latest/_book/demo/
|
||||||
yarn install
|
yarn install
|
||||||
yarn build:web:ci
|
yarn build:web:ci
|
||||||
|
|
||||||
# OLD DEPLOY
|
|
||||||
# cd example
|
|
||||||
# yarn install
|
|
||||||
# yarn run prepare
|
|
||||||
# sed -i "s,http://localhost:5000,${ROOT_URL},g" index.html
|
|
||||||
# sed -i 's,"routerBasename": "/","routerBasename": "/demo",g' index.html
|
|
||||||
# rm -rf node_modules
|
|
||||||
|
|
||||||
# NEW DEPLOY
|
|
||||||
# cpx 'build/*' docs/latest/_book/demo --verbose
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import './OHIFLogo.css'
|
import './OHIFLogo.css'
|
||||||
|
|
||||||
const Icons = `${window.config.routerBasename}icons.svg`
|
const Icons = `${window.config.routerBasename}/icons.svg`
|
||||||
|
|
||||||
function OHIFLogo() {
|
function OHIFLogo() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -36,7 +36,7 @@ const mergeProps = (propsFromState, propsFromDispatch, ownProps) => {
|
|||||||
|
|
||||||
// TODO: Do not display certain options if the current display set
|
// TODO: Do not display certain options if the current display set
|
||||||
// cannot be displayed using these view types
|
// cannot be displayed using these view types
|
||||||
const Icons = `${window.config.routerBasename}icons.svg`
|
const Icons = `${window.config.routerBasename}/icons.svg`
|
||||||
const buttons = [
|
const buttons = [
|
||||||
{
|
{
|
||||||
text: 'Acquired',
|
text: 'Acquired',
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import ConnectedLayoutButton from './ConnectedLayoutButton'
|
|||||||
import ConnectedPluginSwitch from './ConnectedPluginSwitch.js'
|
import ConnectedPluginSwitch from './ConnectedPluginSwitch.js'
|
||||||
import './ToolbarRow.css'
|
import './ToolbarRow.css'
|
||||||
|
|
||||||
const Icons = `${window.config.routerBasename}icons.svg`
|
const Icons = `${window.config.routerBasename}/icons.svg`
|
||||||
|
|
||||||
class ToolbarRow extends Component {
|
class ToolbarRow extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|||||||
@ -4,7 +4,11 @@
|
|||||||
*/
|
*/
|
||||||
export default function(baseDirectory = '/') {
|
export default function(baseDirectory = '/') {
|
||||||
const iconsFileName = 'icons.svg'
|
const iconsFileName = 'icons.svg'
|
||||||
const relativePathToIcons = `${baseDirectory}${iconsFileName}`
|
const sanitizedBaseDirectory =
|
||||||
|
baseDirectory[baseDirectory.length - 1] === '/'
|
||||||
|
? baseDirectory
|
||||||
|
: `${baseDirectory}/`
|
||||||
|
const relativePathToIcons = `${sanitizedBaseDirectory}${iconsFileName}`
|
||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user