<commit_before>import React from 'react';
import { AppIcon, faExclamationTriangle } from '../shell/icons';
import PressTip from 'app/dim-ui/PressTip';
import { DimItem } from 'app/inventory/item-types';
import './PowerCapDisclaimer.scss';
import { t } from 'app/i18next-t';

// temporarily, we are adding warnings to these sourceHashes
// because they display an incorrect Power Limit
export const powerCapDisclaimer = [
  2455011338, // last wish
  1491707941, // gos
];

const link =
  'https://www.reddit.com/r/DestinyTheGame/comments/h9wxur/will_we_have_to_regrind_our_raid_loot_bungie_help/fv0xa5v/';

export function PowerCapDisclaimer({ item }: { item: DimItem }) {
  return (
    (item.isDestiny2() && item.powerCap === 1060 && powerCapDisclaimer.includes(item.source) && (
      <PressTip elementType="span" tooltip={t('Stats.PowerCapDisclaimer', { link })}>
        <AppIcon className="powerCapDisclaimer" icon={faExclamationTriangle} />
      </PressTip>
    )) ||
    null
  );
}<commit_msg>catch reissued last wish gear<commit_after>import React from 'react';
import { AppIcon, faExclamationTriangle } from '../shell/icons';
import PressTip from 'app/dim-ui/PressTip';
import { DimItem } from 'app/inventory/item-types';
import './PowerCapDisclaimer.scss';
import { t } from 'app/i18next-t';
import missingSources from 'data/d2/missing-source-info';

// temporarily, we are adding warnings to these sourceHashes
// because they display an incorrect Power Limit
export const powerCapDisclaimer = [
  2455011338, // last wish
  1491707941, // gos
];

const link =
  'https://www.reddit.com/r/DestinyTheGame/comments/h9wxur/will_we_have_to_regrind_our_raid_loot_bungie_help/fv0xa5v/';

export function PowerCapDisclaimer({ item }: { item: DimItem }) {
  if (
    !item.isDestiny2() || // check the easy stuff first
    item.powerCap !== 1060 || // to try and avoid doing
    (!powerCapDisclaimer.includes(item.source) && !missingSources.lastwish.includes(item.hash)) // the more expensive lookup
  )
    return null;
  return (
    <PressTip elementType="span" tooltip={t('Stats.PowerCapDisclaimer', { link })}>
      <AppIcon className="powerCapDisclaimer" icon={faExclamationTriangle} />
    </PressTip>
  );
}
{'fraction_non_alphanumeric': 0.1332133213321332, 'fraction_numerical': 0.027452745274527453, 'mean_word_length': 4.3825665859564165, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5921144', 'n_tokens_mistral': 758, 'n_tokens_neox': 707, 'n_words': 163}