Skip to content

Commit

Permalink
Use different default text for page title while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
byronhulcher committed Aug 4, 2021
1 parent 3dac295 commit 09b35cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ describe('CrawlerSingleDomain', () => {

const wrapper = shallow(<CrawlerSingleDomain />);

expect(wrapper.prop('pageHeader')).toEqual({ pageTitle: '...' });
expect(wrapper.prop('pageHeader')).toEqual({ pageTitle: 'Loading...' });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { useActions, useValues } from 'kea';

import { EuiCode } from '@elastic/eui';

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

import { getEngineBreadcrumbs } from '../engine';
import { AppSearchPageTemplate } from '../layout';

Expand All @@ -26,7 +28,11 @@ export const CrawlerSingleDomain: React.FC = () => {

const { fetchDomainData } = useActions(CrawlerSingleDomainLogic);

const displayDomainUrl = domain ? domain.url : '...';
const displayDomainUrl = domain
? domain.url
: i18n.translate('xpack.enterpriseSearch.appSearch.crawler.singleDomain.loadingTitle', {
defaultMessage: 'Loading...',
});

useEffect(() => {
fetchDomainData(domainId);
Expand Down

0 comments on commit 09b35cf

Please sign in to comment.