<commit_before>import React from 'react';
import { AppIcon, starIcon, starOutlineIcon } from '../icons';
import _ from 'lodash';
import classNames from 'classnames';
import './star-rating.scss';

export function StarRatingDisplay({ rating }: { rating: number }) {
  rating = Math.floor(rating);
  return (
    <span>
      {_.times(5, (index) => (
        <AppIcon
          key={index}
          icon={index + 1 >= rating ? starIcon : starOutlineIcon}
          className={classNames({ filled: index + 1 >= rating })}
        />
      ))}
    </span>
  );
}<commit_msg>Fix D1 star ratings<commit_after>import React from 'react';
import { AppIcon, starIcon, starOutlineIcon } from '../icons';
import _ from 'lodash';
import classNames from 'classnames';
import './star-rating.scss';

export function StarRatingDisplay({ rating }: { rating: number }) {
  rating = Math.floor(rating);
  return (
    <span>
      {_.times(5, (index) => (
        <AppIcon
          key={index}
          icon={index < rating ? starIcon : starOutlineIcon}
          className={classNames({ filled: index < rating })}
        />
      ))}
    </span>
  );
}
{'fraction_non_alphanumeric': 0.15316901408450703, 'fraction_numerical': 0.0044014084507042256, 'mean_word_length': 2.815436241610738, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '3863124', 'n_tokens_mistral': 347, 'n_tokens_neox': 339, 'n_words': 89}