Skip to content

Commit

Permalink
[Feature Flags Example Plugin] Change ctx provider (#201097)
Browse files Browse the repository at this point in the history
(cherry picked from commit f026208)

# Conflicts:
#	examples/feature_flags_example/public/components/app.tsx
#	examples/feature_flags_example/tsconfig.json
  • Loading branch information
afharo committed Nov 22, 2024
1 parent bf6d847 commit 3d541f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
19 changes: 8 additions & 11 deletions examples/feature_flags_example/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { AppMountParameters, CoreStart } from '@kbn/core/public';
import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';
import { KibanaRootContextProvider } from '@kbn/react-kibana-context-root';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
import { FeatureFlagsExampleApp } from './components/app';

export const renderApp = (coreStart: CoreStart, { element }: AppMountParameters) => {
const { notifications, http, featureFlags } = coreStart;
ReactDOM.render(
<KibanaRootContextProvider {...coreStart}>
<KibanaPageTemplate>
<FeatureFlagsExampleApp
featureFlags={featureFlags}
notifications={notifications}
http={http}
/>
</KibanaPageTemplate>
</KibanaRootContextProvider>,
<KibanaRenderContextProvider {...coreStart}>
<FeatureFlagsExampleApp
featureFlags={featureFlags}
notifications={notifications}
http={http}
/>
</KibanaRenderContextProvider>,
element
);

Expand Down
3 changes: 1 addition & 2 deletions examples/feature_flags_example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
"exclude": ["target/**/*"],
"kbn_references": [
"@kbn/core",
"@kbn/shared-ux-page-kibana-template",
"@kbn/react-kibana-context-root",
"@kbn/core-feature-flags-server",
"@kbn/core-plugins-server",
"@kbn/config-schema",
"@kbn/developer-examples-plugin",
"@kbn/react-kibana-context-render",
]
}

0 comments on commit 3d541f6

Please sign in to comment.