<commit_before>import React from 'react';
import PropTypes from 'prop-types';

import * as mathFunc from 'helpers/math';

const cubed = x => (
  <p>{x} cubed is {mathFunc.cube(x)}</p>
);

const squared = x => (
  <p>{x} squared is {mathFunc.square(x)}</p>
);

const Calcs = ({active}) => {
  if(active === 'squaring')
    return squared(9)

  if(active === 'cubing')
    return cubed(3)

  return(
    <div>
      {cubed(3)}
      {squared(9)}
    </div>
  )
};

Calcs.propTypes = {
  active: PropTypes.string.isRequired
};

export default Calcs;<commit_msg>Bug fix<commit_after>import React from 'react';
import PropTypes from 'prop-types';

import * as mathFunc from 'helpers/math';

const cubed = x => (
  <p>{x} cubed is {mathFunc.cube(x)}</p>
);

const squared = x => (
  <p>{x} squared is {mathFunc.square(x)}</p>
);

const Calcs = ({active}) => {
  if(active === 'squaring')
    return squared(9)

  if(active === 'cubing')
    return cubed(3)

  return(
    <div>
      {cubed(3)}
      {squared(9)}
    </div>
  )
};

Calcs.propTypes = {
  active: PropTypes.string
};

export default Calcs;
{'fraction_non_alphanumeric': 0.18653321201091902, 'fraction_numerical': 0.007279344858962694, 'mean_word_length': 3.3137254901960786, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, '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': '5616952', 'n_tokens_mistral': 434, 'n_tokens_neox': 421, 'n_words': 98}