import { navigate } from 'gatsby' ; const handleLinkClick = ( e ) : void => { e . preventDefault ( ) ; e . stopPropagation ( ) ; navigate ( ( e . target as HTMLElement ) . getAttribute ( 'href' ) || '/' ) ; } ; export default handleLinkClick ;