<commit_before>import * as React from 'react';
import { connect } from 'react-redux';

import { cronPeriodPrettyNames } from 'Constants/Lang/Date';
import { dispatch } from 'Helpers/State/Store';

import { configurePollPeriod } from 'Actions/UIActions/Settings';

import ViewBar from 'View/Components/ViewBar/Index';
import { Button } from 'View/Ui/Index';

interface IFrequencySettingsProps
{
  settings: IStateSettings;
};

class FrequencySettings extends React.Component<IFrequencySettingsProps, any>
{
  render()
  {
    return (
      <ViewBar title="Frequency Settings"
               backLink="/settings">
        <div className="soft-delta">
          <div className="grid">
            <div className="grid__item one-whole">
              <label className="push-zeta--bottom">Polling Frequency</label>
              {Object.keys(cronPeriodPrettyNames)
                     .map((name, i, a) =>
                     (
                       <Button key={name}
                     onClick={() => dispatch(configurePollPeriod(name))}
                               className={(this.props.settings.pollPeriod === name
                                            ? ''
                                            : 'btn--light-grey')
                                          + (i === 0
                                              ? ' btn--hard-bottom'
                                              : '')
                                          + (i !== 0
                                              && i + 1 !== a.length
                                              ? ' btn--hard'
                                              : '')
                                          + (i + 1 === a.length
                                              ? ' btn--hard-top'
                                              : '')}>
                         {cronPeriodPrettyNames[name]}
                       </Button>
                     ))}
            </div>
          </div>
        </div>
      </ViewBar>
    );
  }<commit_msg>Code fix<commit_after>import * as React from 'react';
import { connect } from 'react-redux';

import { cronPeriodPrettyNames } from 'Constants/Lang/Date';
import { dispatch } from 'Helpers/State/Store';

import { configurePollPeriod } from 'Actions/UIActions/Settings';

import ViewBar from 'View/Components/ViewBar/Index';
import { Button } from 'View/Ui/Index';

interface IFrequencySettingsProps
{
  settings: IStateSettings;
};

class FrequencySettings extends React.Component<IFrequencySettingsProps, any>
{
  render()
  {
    return (
      <ViewBar title="Frequency Settings"
               backLink="/settings">
        <div className="soft-delta">
          <div className="grid">
            <div className="grid__item one-whole">
              <label className="push-zeta--bottom">Polling Frequency</label>
              {Object.keys(cronPeriodPrettyNames)
                     .map((name, i, a) =>
                     (
                       <Button key={name}
                               onClick={() => dispatch(configurePollPeriod(name))}
                               className={(this.props.settings.pollPeriod === name
                                            ? ''
                                            : 'btn--light-grey')
                                          + (i === 0
                                              ? ' btn--hard-bottom'
                                              : '')
                                          + (i !== 0
                                              && i + 1 !== a.length
                                              ? ' btn--hard'
                                              : '')
                                          + (i + 1 === a.length
                                              ? ' btn--hard-top'
                                              : '')}>
                         {cronPeriodPrettyNames[name]}
                       </Button>
                     ))}
            </div>
          </div>
        </div>
      </ViewBar>
    );
  }
{'fraction_non_alphanumeric': 0.11064666830587656, 'fraction_numerical': 0.001967051880993361, 'mean_word_length': 0.9595375722543352, 'pattern_counts': {'":': 0, '<': 29, '<?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': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2744983', 'n_tokens_mistral': 868, 'n_tokens_neox': 835, 'n_words': 169}