import { EuiLink } from '@elastic/eui' ; import React from 'react' ; import { APMLinkExtendProps , useAPMHref } from './apm_link' ; export function useServiceMapHref ( serviceName ? ) { const path = serviceName ? `/services/${ serviceName }/service-map` : '/service-map' ; return useAPMHref ( { path } ) ; } interface ServiceMapLinkProps extends APMLinkExtendProps { serviceName ? : string ; } export function ServiceMapLink ( { serviceName , ... rest } ) { const href = useServiceMapHref ( serviceName ) ; return < EuiLink href = { href } { ... rest } />; }