From 3093d83b5497b76c617cbd4dfaf6017586396c90 Mon Sep 17 00:00:00 2001 From: mpabba3003 Date: Wed, 3 Aug 2022 13:50:09 -0700 Subject: [PATCH] breadcrumbfix for datasource management - refactoring code Signed-off-by: mpabba3003 --- .../data_source_table/data_source_table.tsx | 4 +--- .../management_app/mount_management_section.tsx | 11 ++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/plugins/data_source_management/public/components/data_source_table/data_source_table.tsx b/src/plugins/data_source_management/public/components/data_source_table/data_source_table.tsx index 4cd139b52947..db6b9fabc697 100644 --- a/src/plugins/data_source_management/public/components/data_source_table/data_source_table.tsx +++ b/src/plugins/data_source_management/public/components/data_source_table/data_source_table.tsx @@ -12,7 +12,7 @@ export interface DataSourceTableProps { setBreadcrumbs: (crumbs: ChromeBreadcrumb[]) => void; } -export const DataSourceTable = ({setBreadcrumbs}: DataSourceTableProps) => { +export const DataSourceTable = ({ setBreadcrumbs }: DataSourceTableProps) => { useEffect(() => { setBreadcrumbs([ { @@ -29,5 +29,3 @@ export const DataSourceTable = ({setBreadcrumbs}: DataSourceTableProps) => { ); }; - -export {DataSourceTable as default} diff --git a/src/plugins/data_source_management/public/management_app/mount_management_section.tsx b/src/plugins/data_source_management/public/management_app/mount_management_section.tsx index b600aebb0a79..af63db9703d1 100644 --- a/src/plugins/data_source_management/public/management_app/mount_management_section.tsx +++ b/src/plugins/data_source_management/public/management_app/mount_management_section.tsx @@ -15,15 +15,14 @@ import { ManagementAppMountParams } from '../../../management/public'; import { OpenSearchDashboardsContextProvider } from '../../../opensearch_dashboards_react/public'; import { CreateDataSourceWizardWithRouter } from '../components/create_data_source_wizard'; import { DataSourceManagmentContext } from '../types'; -import DataSourceTable from '../components/data_source_table/data_source_table'; - +import { DataSourceTable } from '../components/data_source_table/data_source_table'; export async function mountManagementSection( getStartServices: StartServicesAccessor, params: ManagementAppMountParams ) { const [ - {chrome, application, savedObjects, uiSettings, notifications, overlays, http, docLinks } + { chrome, application, savedObjects, uiSettings, notifications, overlays, http, docLinks }, ] = await getStartServices(); const deps: DataSourceManagmentContext = { @@ -42,9 +41,8 @@ export async function mountManagementSection( const title = i18n.translate('dataSourcesManagement.objects.dataSourcesTitle', { defaultMessage: 'Data Sources', }); - - chrome.docTitle.change(title); + chrome.docTitle.change(title); ReactDOM.render( @@ -55,8 +53,7 @@ export async function mountManagementSection( - +