mirror of
https://github.com/elastic/kibana.git
synced 2025-06-29 03:24:45 -04:00
## Summary This PR fixes a missing `EuiProvider` within the guided onboarding example. Currently the app is barely usable as it throws hundreds or even thousands of errors which make the page extremely slow. #### Before fix https://github.com/user-attachments/assets/87b8252a-82ac-4094-8adf-3cd4c12236ef #### After fix https://github.com/user-attachments/assets/0382192b-94b7-4d4b-bada-2d438a750b14 ### Notes **_This PR does NOT fix all the console errors, that's why you see a couple of errors in the console still on the second video above. It just fixes the bare minimum to make the app at least usable._** --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
35 lines
1.3 KiB
TypeScript
Executable file
35 lines
1.3 KiB
TypeScript
Executable file
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import { AppMountParameters, CoreStart } from '@kbn/core/public';
|
|
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
|
|
import { AppPluginStartDependencies } from './types';
|
|
import { GuidedOnboardingExampleApp } from './components/app';
|
|
|
|
export const renderApp = (
|
|
coreStart: CoreStart,
|
|
{ guidedOnboarding }: AppPluginStartDependencies,
|
|
{ element, history }: AppMountParameters
|
|
) => {
|
|
const { notifications } = coreStart;
|
|
ReactDOM.render(
|
|
<KibanaRenderContextProvider {...coreStart}>
|
|
<GuidedOnboardingExampleApp
|
|
notifications={notifications}
|
|
guidedOnboarding={guidedOnboarding}
|
|
history={history}
|
|
/>
|
|
</KibanaRenderContextProvider>,
|
|
element
|
|
);
|
|
|
|
return () => ReactDOM.unmountComponentAtNode(element);
|
|
};
|