<commit_before>import React from 'react';
import { Button } from 'react-bootstrap';
import Step from './Step';

export default ({active}) => (
  <Step>
    <Button disabled={!active}>
      Upload Cards
    </Button>
  </Step>
);<commit_msg>add progress state<commit_after>import React, {Component} from 'react';
import { Button } from 'react-bootstrap';

import Step from './Step';
import { importNotes } from './trello';

export default class ImportStep extends Component {
  state = {
    progress: 0
  }
  
  handleImport = () => {
    importNotes(this.props.notes, this.updateProgress);
  }

  updateProgress = progress => {
    this.setState({ progress });
  }

  render() {
    const { active }  = this.props;
    return (
      <Step>
        <Button disabled={!active} onClick={this.handleImport}>
          Upload Cards {this.state.progress}
        </Button>
      </Step>
    );
  }
}
{'fraction_non_alphanumeric': 0.14732142857142858, 'fraction_numerical': 0.0011160714285714285, 'mean_word_length': 2.9690265486725664, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, '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': '1308860', 'n_tokens_mistral': 274, 'n_tokens_neox': 264, 'n_words': 71}