{"size": 1338, "ext": "js", "max_stars_repo_path": "app/views/VesicleAnalyzer/components/Table.js", "max_stars_repo_name": "hjh17/vesicle-analyzer-pro", "max_stars_repo_stars_event_min_datetime": "2021-04-06T12:02:26.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-06T12:02:26.000Z", "max_issues_repo_path": "app/views/VesicleAnalyzer/components/Table.js", "max_issues_repo_name": "hjh17/vesicle-analyzer-pro", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/views/VesicleAnalyzer/components/Table.js", "max_forks_repo_name": "hjh17/vesicle-analyzer-pro", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.1162790698, "max_line_length": 68, "alphanum_fraction": 0.6195814649}
import React, { Component } from 'react';
import { compose } from 'recompose';
import withStyles from '@material-ui/core/styles/withStyles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import withLoadingSpinner from '../../../utils/with/loadingSpinner';
import tableStyle from '../styles/tableStyle';

class DiameterTable extends Component<Props> {
  render() {
    const { classes, data, scale } = this.props;

    return (
      <div className={classes.tableContainer}>
        <Table className={classes.table}>
          <TableHead>
            <TableRow>
              <TableCell>Cell</TableCell>
              <TableCell numeric>Diameter</TableCell>
            </TableRow>
          </TableHead>
          <TableBody>
            {data.map((diameter, idx) => (
              <TableRow key={idx}>
                <TableCell>{idx+1}</TableCell>
                <TableCell numeric>{diameter/scale}</TableCell>
              </TableRow>
            ))}
          </TableBody>
        </Table>
      </div>
    );
  }
}

export default compose(
  withStyles(tableStyle),
  withLoadingSpinner('Loading data')
)(DiameterTable);
