<commit_before>/*
 * Copyright (c) 2018, Shopgate, Inc. All rights reserved.
 *
 * This source code is licensed under the Apache 2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */

import React from 'react';
import PropTypes from 'prop-types';

/**
 * The Cart Product Properties component.
 * @param {Object} props The component props.
 * @returns {JSX}
 */
const ProductCharacteristics = ({ characteristics }) => (
  <ul>
    {characteristics.map(({ label, value }) => (
      <li key={`${label}-${value}`}>
        {label}: {value}
      </li>
    ))}
  </ul>
);

ProductCharacteristics.propTypes = {
  characteristics: PropTypes.arrayOf(PropTypes.shape({
    label: PropTypes.string,
    value: PropTypes.string,<commit_msg>CON-2766 - removed workaround for characteristics since it's now returned from the pipelines + adapt to new schema<commit_after>/*
 * Copyright (c) 2018, Shopgate, Inc. All rights reserved.
 *
 * This source code is licensed under the Apache 2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */

import React from 'react';
import PropTypes from 'prop-types';

/**
 * The Cart Product Properties component.
 * @param {Object} props The component props.
 * @returns {JSX}
 */
const ProductCharacteristics = ({ characteristics }) => (
  <ul>
    {characteristics.map(({ name, value }) => (
      <li key={`${name}-${value}`}>
        {name}: {value}
      </li>
    ))}
  </ul>
);

ProductCharacteristics.propTypes = {
  characteristics: PropTypes.arrayOf(PropTypes.shape({
    label: PropTypes.string,
    value: PropTypes.string,
{'fraction_non_alphanumeric': 0.13586291309669524, 'fraction_numerical': 0.009791921664626682, 'mean_word_length': 3.5416666666666665, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '3006543', 'n_tokens_mistral': 479, 'n_tokens_neox': 471, 'n_words': 160}