Skip to content

Commit

Permalink
move KibanaRednerContextProvider where the react tree starts
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed May 22, 2024
1 parent 227b375 commit ab2948f
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import React from 'react';
import { i18n } from '@kbn/i18n';
import type { FileLayer } from '@elastic/ems-client';
import { IUiSettingsClient } from '@kbn/core/public';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
import type { Datatable } from '@kbn/expressions-plugin/public';
import type { FormatFactory } from '@kbn/field-formats-plugin/common';
import {
Expand All @@ -24,7 +23,6 @@ import { emsWorldLayerId } from '../../../common/constants';
import { ChoroplethChartProps } from './types';
import { getEmsSuggestion } from './get_ems_suggestion';
import { PassiveMap } from '../passive_map';
import { getAnalytics, getCoreI18n, getTheme } from '../../kibana_services';

interface Props extends ChoroplethChartProps {
formatFactory: FormatFactory;
Expand Down Expand Up @@ -128,11 +126,7 @@ export function ChoroplethChart({
type: LAYER_TYPE.GEOJSON_VECTOR,
};

return (
<KibanaRenderContextProvider analytics={getAnalytics()} i18n={getCoreI18n()} theme={getTheme()}>
<PassiveMap passiveLayer={choroplethLayer} onRenderComplete={onRenderComplete} />
</KibanaRenderContextProvider>
);
return <PassiveMap passiveLayer={choroplethLayer} onRenderComplete={onRenderComplete} />;
}

function getAccessorLabel(table: Datatable, accessor: string) {
Expand Down

0 comments on commit ab2948f

Please sign in to comment.