Skip to content

Commit

Permalink
[Maps] Remove obsolete link (#76419)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Sep 2, 2020
1 parent 4a4d7ce commit 946e9f0
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions x-pack/plugins/maps/public/routing/routes/list/maps_list_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
getUiSettings,
getToasts,
getCoreChrome,
getNavigateToApp,
} from '../../../kibana_services';
import {
EuiTitle,
Expand All @@ -32,11 +33,18 @@ import {
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { addHelpMenuToAppChrome } from '../../../help_menu_util';
import { Link } from 'react-router-dom';
import { goToSpecifiedPath } from '../../maps_router';
import { APP_ID, MAP_PATH } from '../../../../common/constants';

export const EMPTY_FILTER = '';

function navigateToNewMap() {
const navigateToApp = getNavigateToApp();
navigateToApp(APP_ID, {
path: MAP_PATH,
});
}

export class MapsListView extends React.Component {
state = {
hasInitialFetchReturned: false,
Expand Down Expand Up @@ -388,14 +396,12 @@ export class MapsListView extends React.Component {
let createButton;
if (!this.state.readOnly) {
createButton = (
<Link to={'/map'}>
<EuiButton data-test-subj="newMapLink" fill>
<FormattedMessage
id="xpack.maps.mapListing.createMapButtonLabel"
defaultMessage="Create map"
/>
</EuiButton>
</Link>
<EuiButton data-test-subj="newMapLink" fill onClick={navigateToNewMap}>
<FormattedMessage
id="xpack.maps.mapListing.createMapButtonLabel"
defaultMessage="Create map"
/>
</EuiButton>
);
}
return (
Expand Down

0 comments on commit 946e9f0

Please sign in to comment.