From d745d4fbe573a14f3e402a874336410d7d9985cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 30 Oct 2024 17:04:12 +0000 Subject: [PATCH] fix: use correct router (#447) Signed-off-by: SuZhou-Joe (cherry picked from commit 0a4d768d9baa0167de784266b1a8207c9e2ee727) Signed-off-by: github-actions[bot] --- public/render_app.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/public/render_app.tsx b/public/render_app.tsx index a7dee41c..80639003 100644 --- a/public/render_app.tsx +++ b/public/render_app.tsx @@ -5,12 +5,11 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { BrowserRouter as Router, Route } from 'react-router-dom'; +import { HashRouter as Router, Route } from 'react-router-dom'; import { Provider } from 'react-redux'; import { AppMountParameters, CoreStart } from '../../../src/core/public'; import { FlowFrameworkDashboardsApp } from './app'; import { store } from './store'; -import { PLUGIN_ID } from '../common'; // styling import './global-styles.scss'; @@ -24,7 +23,7 @@ export const renderApp = ( params.element.className = 'stretch-absolute'; ReactDOM.render( - + ( { - if ( - hideInAppSideNavBar && - window.location.pathname.endsWith(`/app/${PLUGIN_ID}`) - ) { - window.location.href = EXPECTED_BASE_PATH; - window.dispatchEvent(new HashChangeEvent('hashchange')); - } + window.dispatchEvent(new HashChangeEvent('hashchange')); }); return () => {