<commit_before>import React from 'react'
import styles from './ProgressBar.scss'
import ClassNames from 'classnames'

export class ProgressBar extends React.Component {
    static defaultProps = {
      totalSteps: 4,
      currentStep: 1
    }

    static propTypes = {
      totalSteps: React.PropTypes.number,
      currentStep: React.PropTypes.number
    }

    render () {
      let steps = []
      let step
      for (let i = 1; i <= this.props.totalSteps; i++) {
          step = {index: i}
          if (i === this.props.currentStep) {
            step.active = true
          }
        steps.push(step)
      }
      return (
        <ul className='progressBar btn-group btn-group-lg'>
          {steps.map((step) => 
            <li key={step.index} className={ClassNames('step btn btn-primary', {active: step.active})}>{step.index}</li>
          )}
        </ul>
      )
    }
}

export default ProgressBar<commit_msg>-Refactored ProgressBar component and made it work with clicks<commit_after>import React from 'react'
import './ProgressBar.scss'
import ClassNames from 'classnames'
import { Link } from 'react-router'

export class ProgressBar extends React.Component {
    static defaultProps = {
      totalSteps: 4,
      currentStep: 1
    }

    static propTypes = {
      totalSteps: React.PropTypes.number,
      currentStep: React.PropTypes.number
    }

    render () {
      let steps = []
      let step
      for (let i = 1; i <= this.props.totalSteps; i++) {
        step = {
          index: i,
          url: '/tutorial/step/' + i
        }
        if (i === this.props.currentStep) {
          step.active = true
        }
        steps.push(step)
      }
      return (
        <div className='progressBar btn-group btn-group-lg'>
          {steps.map((step) =>
            <Link to={step.url} className={ClassNames('step btn btn-primary', {active: step.active})}>
            {step.index}
            </Link>
          )}
        </div>
      )
    }
}

export default ProgressBar
{'fraction_non_alphanumeric': 0.12220566318926974, 'fraction_numerical': 0.0029806259314456036, 'mean_word_length': 1.9837037037037037, 'pattern_counts': {'":': 0, '<': 13, '<?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': '5798227', 'n_tokens_mistral': 605, 'n_tokens_neox': 588, 'n_words': 148}