<commit_before>import React, { PureComponent } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { Alignment, Button, Intent, MenuItem } from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';

import './SortingBar.scss';

class SortingBar extends PureComponent {
  renderOption = (option, { handleClick }) => (
    <MenuItem
      key={option.field}
      onClick={handleClick}
      text={option.label}
    />
  )

  render() {
    const { activeDirection, activeSort, onSort, sortingOptions } = this.props;
    return (
      <div className="SortingBar">
        <div className="SortingBar__item">
          <span className="SortingBar__label">
            <FormattedMessage
              id="collection.index.sort.label"
              defaultMessage="Sort by:"
            />
          </span>
          <div className="SortingBar__control">
            <Select
              itemRenderer={this.renderOption}
              items={sortingOptions}
              onItemSelect={onSort}
              activeItem={activeSort}
              popoverProps={{
                minimal: true,
                fill: false,
                className: "SortingBar__item__popover",
              }}
              inputProps={{
                fill: false,
              }}
              filterable={false}
              resetOnClose
              resetOnSelect
            >
              <Button
                text={activeSort.label}
                alignText={Alignment.LEFT}
                minimal
                intent={Intent.PRIMARY}
                rightIcon="caret-down"
              />
            </Select>
          </div>
        </div>
        <div className="SortingBar__item">
          <span className="SortingBar__label">
            <FormattedMessage
              id="collection.index.sort.label"
              defaultMessage="Direction:"<commit_msg>resolved linting error<commit_after>import React, { PureComponent } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { Alignment, Button, Intent, MenuItem } from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';

import './SortingBar.scss';

class SortingBar extends PureComponent {
  renderOption = (option, { handleClick }) => (
    <MenuItem
      key={option.field}
      onClick={handleClick}
      text={option.label}
    />
  )

  render() {
    const { activeDirection, activeSort, onSort, sortingOptions } = this.props;
    return (
      <div className="SortingBar">
        <div className="SortingBar__item">
          <span className="SortingBar__label">
            <FormattedMessage
              id="collection.index.sort.label"
              defaultMessage="Sort by:"
            />
          </span>
          <div className="SortingBar__control">
            <Select
              itemRenderer={this.renderOption}
              items={sortingOptions}
              onItemSelect={onSort}
              activeItem={activeSort}
              popoverProps={{
                minimal: true,
                fill: false,
                className: 'SortingBar__item__popover',
              }}
              inputProps={{
                fill: false,
              }}
              filterable={false}
              resetOnClose
              resetOnSelect
            >
              <Button
                text={activeSort.label}
                alignText={Alignment.LEFT}
                minimal
                intent={Intent.PRIMARY}
                rightIcon="caret-down"
              />
            </Select>
          </div>
        </div>
        <div className="SortingBar__item">
          <span className="SortingBar__label">
            <FormattedMessage
              id="collection.index.sort.label"
              defaultMessage="Direction:"
{'fraction_non_alphanumeric': 0.10405228758169935, 'fraction_numerical': 0.0, 'mean_word_length': 1.6587908269631688, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '6801875', 'n_tokens_mistral': 969, 'n_tokens_neox': 946, 'n_words': 179}