<commit_before>import _ from 'lodash';

import React, { Component } from 'react';
import { Table } from 'semantic-ui-react'

class Leaderboard extends Component {

    handleTeamClick = (teamdata) => (e) => {
        console.log("team click");
        console.log(teamdata);

        // TODO add a point here that can trigger the open state of the modal
    };

    render () {

        const { teams, standings } = this.props;

        return (
            <Table singleLine celled unstackable>
                <Table.Header>
                    <Table.Row>
                        <Table.HeaderCell collapsing></Table.HeaderCell>
                        <Table.HeaderCell collapsing>Team</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">M</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">W</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">L</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">D</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">Pts</Table.HeaderCell>
                    </Table.Row>
                </Table.Header>

                <Table.Body>
                    {
                        standings.map((teamdata, index) => {

                            let team = _.find(teams, {'id': teamdata.id});

                            return (
                                <Table.Row key={index} onClick={ this.handleTeamClick(team) }>
                                    <Table.Cell>{ index + 1 }</Table.Cell>
                                    <Table.Cell>{ team.name }</Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.matches }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.wins }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.losses }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.draws }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.points }
                                    </Table.Cell>
                                    {
                                    // add a teamview component which is a modal
                                    // and has a prop to determine it being open or not
                                    // Actually don't do this - we'll move to a list
                                    // that is on the actual RHS of the screen.
                                    // in an accordion
                                    }
                                </Table.Row>
                            );
                        })
                    }
                </Table.Body>
            </Table>
        )
    }
}

export default Leaderboard;

<commit_msg>Removed click feature from leaderboard<commit_after>import _ from 'lodash';

import React, { Component } from 'react';
import { Table } from 'semantic-ui-react'

class Leaderboard extends Component {

    render () {

        const { teams, standings } = this.props;

        return (
            <Table singleLine celled unstackable>
                <Table.Header>
                    <Table.Row>
                        <Table.HeaderCell collapsing></Table.HeaderCell>
                        <Table.HeaderCell collapsing>Team</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">M</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">W</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">L</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">D</Table.HeaderCell>
                        <Table.HeaderCell textAlign="center">Pts</Table.HeaderCell>
                    </Table.Row>
                </Table.Header>

                <Table.Body>
                    {
                        standings.map((teamdata, index) => {

                            let team = _.find(teams, {'id': teamdata.id});

                            return (
                                <Table.Row key={index}>
                                    <Table.Cell>{ index + 1 }</Table.Cell>
                                    <Table.Cell>{ team.name }</Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.matches }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.wins }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.losses }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.draws }
                                    </Table.Cell>
                                    <Table.Cell textAlign="center">
                                        { teamdata.points }
                                    </Table.Cell>
                                </Table.Row>
                            );
                        })
                    }
                </Table.Body>
            </Table>
        )
    }
}

export default Leaderboard;


{'fraction_non_alphanumeric': 0.09214371669245315, 'fraction_numerical': 0.00034381983840467596, 'mean_word_length': 0.8324409448818898, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 52, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5816963', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1180, 'n_words': 242}