aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
diff options
context:
space:
mode:
authorsai-neetha <sai-neetha.phulmali@highstreet-technologies.com>2023-03-20 08:05:47 +0100
committerhighstreetherbert <herbert.eiselt@highstreet-technologies.com>2023-03-29 19:06:25 +0200
commit15e2d3a29b0d1a304965e34f114a911e5a7abdb3 (patch)
tree711ef5616aceb115a1081cccd152eeae0e87bc79 /sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
parentac5e2dc8f1ee4d5549f7260374e8164d52b07f55 (diff)
Odlux Update
Add eslint and custom icons update Issue-ID: CCSDK-3871 Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com> Change-Id: If6b676128cc9cff0437a5dc54f85eaafd3b8c586 Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/helpApp/src/plugin.tsx')
-rw-r--r--sdnr/wt/odlux/apps/helpApp/src/plugin.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
index 50a264b15..5d860e530 100644
--- a/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
+++ b/sdnr/wt/odlux/apps/helpApp/src/plugin.tsx
@@ -17,14 +17,12 @@
*/
// app configuration and main entry point for the app
-import * as React from "react";
+import React from "react";
import { withRouter, RouteComponentProps, Route, Switch, Redirect } from 'react-router-dom';
-import { faFirstAid } from '@fortawesome/free-solid-svg-icons'; // select app icon
-
import applicationManager from '../../../framework/src/services/applicationManager';
import { IApplicationStoreState } from "../../../framework/src/store/applicationStore";
-import connect, { Connect, IDispatcher } from '../../../framework/src/flux/connect';
+import { connect, Connect, IDispatcher } from '../../../framework/src/flux/connect';
import { requestTocAsyncAction, requestDocumentAsyncActionCreator } from "./actions/helpActions";
import { helpAppRootHandler } from './handlers/helpAppRootHandler';
@@ -35,11 +33,13 @@ import { HelpStatus } from "./components/helpStatus";
import '!style-loader!css-loader!highlight.js/styles/default.css';
import HelpTocApp from "./views/helpTocApp";
+const appIcon = require('./assets/icons/helpAppIcon.svg'); // select app icon
+
const mapProps = (state: IApplicationStoreState) => ({
});
-const mapDisp = (dispatcher: IDispatcher) => ({
+const mapDispatch = (dispatcher: IDispatcher) => ({
requestDocument: (path: string) => {
dispatcher.dispatch(requestDocumentAsyncActionCreator(path));
}
@@ -47,7 +47,7 @@ const mapDisp = (dispatcher: IDispatcher) => ({
let currentHelpPath: string | undefined = undefined;
-const HelpApplicationRouteAdapter = connect(mapProps, mapDisp)((props: RouteComponentProps<{ '0'?: string }> & Connect<typeof mapProps, typeof mapDisp>) => {
+const HelpApplicationRouteAdapter = connect(mapProps, mapDispatch)((props: RouteComponentProps<{ '0'?: string }> & Connect<typeof mapProps, typeof mapDispatch>) => {
if (currentHelpPath !== props.match.params["0"]) {
// route parameter has changed
@@ -76,7 +76,7 @@ const App = withRouter((props: RouteComponentProps) => (
export async function register() {
const applicationApi = applicationManager.registerApplication({
name: "help",
- icon: faFirstAid,
+ icon: appIcon,
rootComponent: App,
rootActionHandler: helpAppRootHandler,
statusBarElement: HelpStatus,
@@ -84,7 +84,7 @@ export async function register() {
//subMenuEntry: SubMenuEntry
});
- // start the initial toc request after the application store is initalized
+ // start the initial toc request after the application store is initialized
const store = await applicationApi.applicationStoreInitialized;
store.dispatch(requestTocAsyncAction);