diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/index.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/index.tsx index 51a2074e4da822..65474887f3e272 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/index.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/index.tsx @@ -8,18 +8,17 @@ import * as React from 'react'; import ReactDOM from 'react-dom'; import { CoreStart, AppMountParameters } from 'kibana/public'; import { I18nProvider, FormattedMessage } from '@kbn/i18n/react'; -import { History, createBrowserHistory, createHashHistory } from 'history'; +import { History, createHashHistory } from 'history'; import { Route, Router, Switch } from 'react-router-dom'; /** * This module will be loaded asynchronously to reduce the bundle size of your plugin's main bundle. */ -export function renderApp(coreStart: CoreStart, { appBasePath, element }: AppMountParameters) { +export function renderApp(coreStart: CoreStart, { element }: AppMountParameters) { coreStart.http.get('/api/endpoint/hello-world'); - const history = createHashHistory(); - // const history = createBrowserHistory({ basename: appBasePath }) - ReactDOM.render(, element); + const history = createHashHistory() + ReactDOM.render(, element); return () => { ReactDOM.unmountComponentAtNode(element); @@ -30,33 +29,22 @@ interface RouterProps { history: History; } -const AppRoot: React.FC = React.memo(({ history }) => ( +const AppRoot: React.FC = React.memo(({history}) => ( - - - ( + + + (

- )} - /> - ( -

+ )} /> + ( +

- )} - /> - ( - - )} - /> - + )} /> + } /> + ));