Skip to content

Commit

Permalink
change interface of renderApp in resolver_test plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
oatkiller committed Dec 5, 2019
1 parent f11281e commit 075ed03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import * as React from 'react';
import ReactDOM from 'react-dom';
import { AppMountContext, AppMountParameters } from 'kibana/public';
import { AppMountParameters } from 'kibana/public';
import { I18nProvider } from '@kbn/i18n/react';
import { IEmbeddable } from 'src/plugins/embeddable/public';
import { useEffect } from 'react';
Expand All @@ -15,10 +15,9 @@ import { useEffect } from 'react';
* This module will be loaded asynchronously to reduce the bundle size of your plugin's main bundle.
*/
export function renderApp(
...args: [AppMountContext, AppMountParameters, Promise<IEmbeddable | undefined>]
{ element }: AppMountParameters,
embeddable: Promise<IEmbeddable | undefined>
) {
const [, { element }, embeddable] = args;

ReactDOM.render(
<I18nProvider>
<AppRoot embeddable={embeddable} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export class ResolverTestPlugin implements Plugin {
title: i18n.translate('xpack.resolver_test.pluginTitle', {
defaultMessage: 'Resolver Test',
}),
mount: async (context, params) => {
mount: async (_context, params) => {
const { renderApp } = await import('./applications/resolver_test');
return renderApp(context, params, this.embeddablePromise);
return renderApp(params, this.embeddablePromise);
},
});
}
Expand Down

0 comments on commit 075ed03

Please sign in to comment.