Skip to content

Commit

Permalink
Remove unneded ui/documentation_links import (#49886)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza Katz authored Nov 6, 2019
1 parent c4d1430 commit 3d2b120
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {

import { InjectedIntl, injectI18n, FormattedMessage } from '@kbn/i18n/react';
import { debounce, compact, isEqual } from 'lodash';
import { documentationLinks } from 'ui/documentation_links';
import { Toast } from 'src/core/public';
import {
AutocompleteSuggestion,
Expand Down Expand Up @@ -348,15 +347,15 @@ export class QueryBarInputUI extends Component<Props, State> {
suggestion.field.subType.nested &&
!this.services.storage.get('kibana.KQLNestedQuerySyntaxInfoOptOut')
) {
const notifications = this.services.notifications;
const { notifications, docLinks } = this.services;

const onKQLNestedQuerySyntaxInfoOptOut = (toast: Toast) => {
if (!this.services.storage) return;
this.services.storage.set('kibana.KQLNestedQuerySyntaxInfoOptOut', true);
notifications!.toasts.remove(toast);
};

if (notifications) {
if (notifications && docLinks) {
const toast = notifications.toasts.add({
title: this.props.intl.formatMessage({
id: 'data.query.queryBar.KQLNestedQuerySyntaxInfoTitle',
Expand All @@ -372,7 +371,7 @@ export class QueryBarInputUI extends Component<Props, State> {
Learn more in our {link}."
values={{
link: (
<EuiLink href={documentationLinks.query.kueryQuerySyntax} target="_blank">
<EuiLink href={docLinks.links.query.kueryQuerySyntax} target="_blank">
<FormattedMessage
id="data.query.queryBar.KQLNestedQuerySyntaxInfoDocLinkText"
defaultMessage="docs"
Expand Down

0 comments on commit 3d2b120

Please sign in to comment.