Skip to content

Commit

Permalink
Change routing to utilize internal navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Samiul-TheSoccerFan committed Apr 8, 2024
1 parent acfad62 commit 8e0dda0
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { EuiButton } from '@elastic/eui';

import { i18n } from '@kbn/i18n';

import { ENTERPRISE_SEARCH_CONTENT_PLUGIN } from '../../../../../../../common/constants';
import { KibanaLogic } from '../../../../../shared/kibana';

import { PLAYGROUND_PATH } from '../../../../routes';
Expand All @@ -25,16 +24,15 @@ export const SearchPlaygroundPopover: React.FC<SearchPlaygroundPopoverProps> = (
indexName,
ingestionMethod,
}) => {
const playgroundUrl =
ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL + PLAYGROUND_PATH + `?defaultIndexName=${indexName}`;
const playgroundUrl = PLAYGROUND_PATH + `?defaultIndexName=${indexName}`;

return (
<EuiButton
data-telemetry-id={`entSearchContent-${ingestionMethod}-header-viewPlayground`}
iconType="eye"
onClick={() => {
KibanaLogic.values.navigateToUrl(playgroundUrl, {
shouldNotCreateHref: true,
shouldNotCreateHref: false,
});
}}
>
Expand Down

0 comments on commit 8e0dda0

Please sign in to comment.