<commit_before>// @flow

import ProgressBar from "./../../../components/progressBar";

type IFundBreakdown = {
  data: Object,
}

export const FundBreakdown = ({ data }: IFundBreakdown) => {
  if (!data) return null;
  return (
    <div>
      <h3 className="text-light-primary soft-half-bottom push-double-bottom" style={{ borderBottom: "1px solid" }}>
        Fund Breakdown
      </h3>
      {Object.keys(data.accounts).map((title, i) =>
        <div className="push-bottom" key={i}>
          <ProgressBar
            theme={""}
            title={title}
            total={data.accounts[`${title}`].toString()}
            percentDone={100 * (data.accounts[title] / data.total)}
            style={{}}
          />
        </div>
      )}
    </div>
  );
};

export default FundBreakdown;<commit_msg>only show funds if given amount is more than 0<commit_after>// @flow

import ProgressBar from "./../../../components/progressBar";

type IFundBreakdown = {
  data: Object,
}

export const FundBreakdown = ({ data }: IFundBreakdown) => {
  if (!data) return null;
  return (
    <div>
      <h3 className="text-light-primary soft-half-bottom push-double-bottom" style={{ borderBottom: "1px solid" }}>
        Fund Breakdown
      </h3>
      {Object.keys(data.accounts).filter(x => data.accounts[x] > 0).map((title, i) =>
        <div className="push-bottom" key={i}>
          <ProgressBar
            theme={""}
            title={title}
            total={data.accounts[title]}
            percentDone={100 * (data.accounts[title] / data.total)}
            style={{}}
          />
        </div>
      )}
    </div>
  );
};

export default FundBreakdown;
{'fraction_non_alphanumeric': 0.16797110174593619, 'fraction_numerical': 0.008428657435279952, 'mean_word_length': 2.2652259332023577, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, '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': '5701554', 'n_tokens_mistral': 517, 'n_tokens_neox': 513, 'n_words': 110}