content: import React from 'react'
  import {connect} from 'react-redux';
  import { bindActionCreators } from 'redux';
  import * as actionCreators from '../actions'
  
  const Row = (props) => (
    <tr key={props.key} className={(props.email == props.me) ? 'bold' : ''}>
      <td className="id">{props.rank}</td>
      <td>{props.score} pts</td>
      <td>{props.email}</td>
    </tr>
  )
  
  const Leaderboard = (props) => {
    return (
    <table className="table">
      <tbody>
      {props.leaderboard.map((obj, key) => {
        if (!!props.top)
          if (key > 7)
            return;
        let k = Object.keys(obj);
        return (
          <Row key={key} me={props.me} rank={++key} top5={++key <= 5} email={k} score={obj[k]} />
        )
      })}
      </tbody>
    </table>
    )
  }
  const mapStateToProps = (state) => ({
    me: state.auth.email
  });
  
  export default connect(mapStateToProps)(Leaderboard)
  