summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/helpApp/src/plugin.tsx')
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/plugin.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
index 77c2992c4..50a264b15 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
@@ -30,10 +30,10 @@ import { requestTocAsyncAction, requestDocumentAsyncActionCreator } from "./acti
import { helpAppRootHandler } from './handlers/helpAppRootHandler';
import { HelpApplication } from './views/helpApplication';
-import { SubMenuEntry } from "./components/subMenuEntry";
import { HelpStatus } from "./components/helpStatus";
import '!style-loader!css-loader!highlight.js/styles/default.css';
+import HelpTocApp from "./views/helpTocApp";
const mapProps = (state: IApplicationStoreState) => ({
@@ -48,6 +48,7 @@ const mapDisp = (dispatcher: IDispatcher) => ({
let currentHelpPath: string | undefined = undefined;
const HelpApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ '0'?: string }> & Connect<typeof mapProps, typeof mapDisp>) => {
+
if (currentHelpPath !== props.match.params["0"]) {
// route parameter has changed
currentHelpPath = props.match.params["0"] || undefined;
@@ -58,6 +59,7 @@ const HelpApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComp
}
});
}
+
return (
<HelpApplication />
)
@@ -65,8 +67,9 @@ const HelpApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComp
const App = withRouter((props: RouteComponentProps) => (
<Switch>
- <Route path={ `${ props.match.path }/*` } component={ HelpApplicationRouteAdapter } />
- <Redirect to={ `${ props.match.path }` } />
+ <Route exact path={`${props.match.path}/`} component={HelpTocApp} />
+ <Route path={`${props.match.path}/*`} component={HelpApplicationRouteAdapter} />
+ <Route path={`${props.match.path}`} component={HelpTocApp} />
</Switch>
));
@@ -78,7 +81,7 @@ export async function register() {
rootActionHandler: helpAppRootHandler,
statusBarElement: HelpStatus,
menuEntry: "Help",
- subMenuEntry: SubMenuEntry
+ //subMenuEntry: SubMenuEntry
});
// start the initial toc request after the application store is initalized