Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Jan 7, 2021
1 parent bff062e commit d25bfd1
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import { EuiLink } from '@elastic/eui';
import React from 'react';
import { APMLinkExtendProps, useAPMHref } from './APMLink';

function pathFor(serviceName?: string) {
return serviceName ? `/services/${serviceName}/service-map` : '/service-map';
}

export function useServiceMapHref(serviceName?: string) {
return useAPMHref(pathFor(serviceName));
const pathFor = serviceName
? `/services/${serviceName}/service-map`
: '/service-map';
return useAPMHref(pathFor);
}

interface ServiceMapLinkProps extends APMLinkExtendProps {
Expand Down

0 comments on commit d25bfd1

Please sign in to comment.