<commit_before>/*
 * @flow
 */

import type {Module} from '../../types/Stats';

import React from 'react';
import {getClassName} from '../Bootstrap/GlyphiconNames';
import {Link} from '../Bootstrap/Button';

type Props = {
  prefix: ?string,
  module: Module,
};

export default function ExternalModuleLink(props: Props) {
  // https://phabricator.pinadmin.com/diffusion/P/browse/master/webapp/app/mobile/index.js$20
  // https://phabricator.pinadmin.com/diffusion/P/browse/master/
  // ../../../../../app/analytics/modules/SelectButtonWrapper/SelectButtonWrapper.js
  // ../../../../../app/analytics/modules/SelectButtonWrapper/SelectButtonWrapper.js

  // REACT_APP_FILE_URL_PREFIX=https://phabricator.pinadmin.com/diffusion/P/browse/master/webapp/a/b/c/d/e/

  // https://phabricator.pinadmin.com/diffusion/P/browse/master/webapp/a/b/c/d/e/../../../../../app/analytics/modules/SelectButtonWrapper/SelectButtonWrapper.js
  if (props.prefix) {
    const file = props.module.name;
    const href = props.prefix + file;
    return (
      <Link href={href} newtab={true}>
        <span className={getClassName('new-window')} />
      </Link>
    );
  } else {
    return null;
  }
}<commit_msg>Add aria label to external link component<commit_after>/*
 * @flow
 */

import type {Module} from '../../types/Stats';

import React from 'react';
import {getClassName} from '../Bootstrap/GlyphiconNames';
import {Link} from '../Bootstrap/Button';

type Props = {
  prefix: ?string,
  module: Module,
};

export default function ExternalModuleLink(props: Props) {
  if (props.prefix) {
    const file = props.module.name;
    const href = props.prefix + file;
    return (
      <Link href={href} newtab={true}>
        <span
          aria-label="Open in new window"
          className={getClassName('new-window')}
        />
      </Link>
    );
  } else {
    return null;
  }
}
{'fraction_non_alphanumeric': 0.17502668089647813, 'fraction_numerical': 0.0010672358591248667, 'mean_word_length': 2.90625, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '7475917', 'n_tokens_mistral': 619, 'n_tokens_neox': 604, 'n_words': 114}