<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import PlaceholderLabel from '@shopgate/pwa-ui-shared/PlaceholderLabel';
import PriceBase from '@shopgate/pwa-ui-shared/Price';
import connect from './connector';
import styles from './style';

/**
 * The Price component.
 * @param {Object} props The component props.
 * @return {JSX}
 */
const Price = ({ price }) => (
  <PlaceholderLabel ready={(price !== null)} className={styles.placeholder}>
    {(price && price.unitPrice) && (
      <PriceBase
        className={styles.price}
        currency={price.currency}
        discounted={!!price.discount}
        taxDisclaimer
        unitPrice={price.totalPrice}
        unitPriceMin={price.unitPriceMin}
      />
    )}
  </PlaceholderLabel>
);
<commit_msg>PI-9154: adjusted evaluation of price on product detail page so 0 is not seen as no value<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import PlaceholderLabel from '@shopgate/pwa-ui-shared/PlaceholderLabel';
import PriceBase from '@shopgate/pwa-ui-shared/Price';
import connect from './connector';
import styles from './style';

/**
 * The Price component.
 * @param {Object} props The component props.
 * @return {JSX}
 */
const Price = ({ price }) => (
  <PlaceholderLabel ready={(price !== null)} className={styles.placeholder}>
    {(price && price.unitPrice !== null && price.unitPrice !== undefined) && (
      <PriceBase
        className={styles.price}
        currency={price.currency}
        discounted={!!price.discount}
        taxDisclaimer
        unitPrice={price.totalPrice}
        unitPriceMin={price.unitPriceMin}
      />
    )}
  </PlaceholderLabel>
);

{'fraction_non_alphanumeric': 0.1422668240850059, 'fraction_numerical': 0.0029515938606847697, 'mean_word_length': 3.5934959349593494, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '1789242', 'n_tokens_mistral': 481, 'n_tokens_neox': 475, 'n_words': 123}