<commit_before>import { ComponentProps } from 'react';
import { Link as MuiLink } from '@mui/material';

interface LinkProps extends ComponentProps<typeof MuiLink> {
  opensInNewTab?: boolean;
}

const Link = (props: LinkProps): JSX.Element => {
  const { opensInNewTab, ...linkProps } = props;

  return (
    <MuiLink
      {...linkProps}
      {...(opensInNewTab && {
        target: '_blank',
        rel: 'noopener noreferrer',
      })}
      className={`cursor-pointer ${props.className}`}
    />
  );
};

export default Link;<commit_msg>feat(link): support underline only on hover<commit_after>import { ComponentProps } from 'react';
import { Link as MuiLink } from '@mui/material';

interface LinkProps extends ComponentProps<typeof MuiLink> {
  opensInNewTab?: boolean;
  underlinesOnHover?: boolean;
}

const Link = (props: LinkProps): JSX.Element => {
  const {
    opensInNewTab,
    underlinesOnHover: underlineOnHover,
    ...linkProps
  } = props;

  return (
    <MuiLink
      color="links"
      {...linkProps}
      {...(opensInNewTab && {
        target: '_blank',
        rel: 'noopener noreferrer',
      })}
      className={`cursor-pointer ${
        underlineOnHover && 'no-underline hoverable:hover:underline'
      } ${props.className}`}
    />
  );
};

export default Link;
{'fraction_non_alphanumeric': 0.14208909370199693, 'fraction_numerical': 0.0, 'mean_word_length': 3.09748427672956, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6632119', 'n_tokens_mistral': 415, 'n_tokens_neox': 408, 'n_words': 92}