From d61497b34f42b5f6f4b49f87eb3c443c9b3b53d4 Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Tue, 30 Nov 2021 13:22:42 -0500 Subject: [PATCH] [Maps] Use theme provider in Maps-app (#119060) --- x-pack/plugins/maps/public/render_app.tsx | 47 ++++++++++++----------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/x-pack/plugins/maps/public/render_app.tsx b/x-pack/plugins/maps/public/render_app.tsx index 17c1dfdc98f2e..bf7aec7f5f15e 100644 --- a/x-pack/plugins/maps/public/render_app.tsx +++ b/x-pack/plugins/maps/public/render_app.tsx @@ -10,6 +10,7 @@ import { render, unmountComponentAtNode } from 'react-dom'; import { Router, Switch, Route, Redirect, RouteComponentProps } from 'react-router-dom'; import { i18n } from '@kbn/i18n'; import type { AppMountParameters } from 'kibana/public'; +import { KibanaThemeProvider } from '../../../../src/plugins/kibana_react/public'; import { getCoreChrome, getCoreI18n, @@ -62,7 +63,7 @@ function setAppChrome() { } export async function renderApp( - { element, history, onAppLeave, setHeaderActionMenu }: AppMountParameters, + { element, history, onAppLeave, setHeaderActionMenu, theme$ }: AppMountParameters, AppUsageTracker: React.FC ) { goToSpecifiedPath = (path) => history.push(path); @@ -109,27 +110,29 @@ export async function renderApp( render( - - - - - // Redirect other routes to list, or if hash-containing, their non-hash equivalents - { - if (hash) { - // Remove leading hash - const newPath = hash.substr(1); - return ; - } else if (pathname === '/' || pathname === '') { - return ; - } else { - return ; - } - }} - /> - - + + + + + + // Redirect other routes to list, or if hash-containing, their non-hash equivalents + { + if (hash) { + // Remove leading hash + const newPath = hash.substr(1); + return ; + } else if (pathname === '/' || pathname === '') { + return ; + } else { + return ; + } + }} + /> + + + , element