Skip to content

Commit

Permalink
[Files] Use React theme provider in the files management section (#15…
Browse files Browse the repository at this point in the history
…9504)

## Summary

Closes #159154

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
vadimkibana and kibanamachine authored Jun 15, 2023
1 parent 16193c6 commit 8e5440e
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions src/plugins/files_management/public/mount_management_section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { toMountPoint } from '@kbn/kibana-react-plugin/public';
import { KibanaThemeProvider, toMountPoint } from '@kbn/kibana-react-plugin/public';
import { I18nProvider, FormattedRelative } from '@kbn/i18n-react';
import type { CoreStart } from '@kbn/core/public';
import type { ManagementAppMountParams } from '@kbn/management-plugin/public';
Expand All @@ -36,25 +36,27 @@ export const mountManagementSection = (

ReactDOM.render(
<I18nProvider>
<QueryClientProvider client={queryClient}>
<TableListViewKibanaProvider
{...{
core: coreStart as unknown as TableListViewKibanaDependencies['core'],
toMountPoint,
FormattedRelative,
}}
>
<FilesManagementAppContextProvider
filesClient={filesClientFactory.asUnscoped()}
getFileKindDefinition={getFileKindDefinition}
getAllFindKindDefinitions={getAllFindKindDefinitions}
<KibanaThemeProvider theme$={coreStart.theme.theme$}>
<QueryClientProvider client={queryClient}>
<TableListViewKibanaProvider
{...{
core: coreStart as unknown as TableListViewKibanaDependencies['core'],
toMountPoint,
FormattedRelative,
}}
>
<Router history={history}>
<Route path="/" component={App} />
</Router>
</FilesManagementAppContextProvider>
</TableListViewKibanaProvider>
</QueryClientProvider>
<FilesManagementAppContextProvider
filesClient={filesClientFactory.asUnscoped()}
getFileKindDefinition={getFileKindDefinition}
getAllFindKindDefinitions={getAllFindKindDefinitions}
>
<Router history={history}>
<Route path="/" component={App} />
</Router>
</FilesManagementAppContextProvider>
</TableListViewKibanaProvider>
</QueryClientProvider>
</KibanaThemeProvider>
</I18nProvider>,
element
);
Expand Down

0 comments on commit 8e5440e

Please sign in to comment.