<commit_before>import React, { Component } from 'react';
import Column from '../Column';
import Card from '../Card';


export default class Dashboard extends Component {
    state = {
        data: []
    };

    getBody = () => {
        const {data} = this.state;
        if (!data.length) return 'Loading...';

        const arr = {};
        data.forEach((el) => {
            if(!arr[el.status])  arr[el.status] = [];
            arr[el.status].push(el) ;
        });

        const columns = Object.keys(arr).map((key, i) => {
            const cards = (arr[key].map((el, i) => <Card key={i} data={el} />));
            return <Column key={i}>{cards}</Column>
        });

        return <div className="row">{columns}</div>
    };

    constructor(props) {
        super(props);

    }

    componentWillMount() {
        fetch('http://localhost:3000/api/tickets/')
            .then((response) => response.json())
            .then((data) => {
                this.setState({data})
            })
    }

    render() {
        return (
            <div>{this.getBody()}</div>
        );
    }
}
<commit_msg>dashboard update var name<commit_after>import React, { Component } from 'react';
import Column from '../Column';
import Card from '../Card';


export default class Dashboard extends Component {
    state = {
        data: []
    };

    getBody = () => {
        const {data} = this.state;
        if (!data.length) return 'Loading...';

        const cardsSotrtedByStatus = {};
        data.forEach((el) => {
            if(!cardsSotrtedByStatus[el.status])  cardsSotrtedByStatus[el.status] = [];
            cardsSotrtedByStatus[el.status].push(el) ;
        });

        const columns = Object.keys(cardsSotrtedByStatus).map((key, i) => {
            const cards = (cardsSotrtedByStatus[key].map((el, i) => <Card key={i} data={el} />));
            return <Column key={i}>{cards}</Column>
        });

        return <div className="row">{columns}</div>
    };

    componentWillMount() {
        fetch('http://localhost:3000/api/tickets/')
            .then((response) => response.json())
            .then((data) => {
                this.setState({data})
            })
    }

    render() {
        return (
            <div>{this.getBody()}</div>
        );
    }
}

{'fraction_non_alphanumeric': 0.17868064657055482, 'fraction_numerical': 0.0034949759720401923, 'mean_word_length': 1.8987341772151898, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 29, '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': '7466430', 'n_tokens_mistral': 698, 'n_tokens_neox': 676, 'n_words': 127}