<commit_before>import * as React from 'react';
import { Hit, HitMap, RequesterMap } from '../../types';
import { ResourceList } from '@shopify/polaris';
// import HitCard from './HitCard';
import HitItem from './HitItem';
import EmptyHitTable from './EmptyHitTable';

import { sortByTime } from '../../utils/sorting';

export interface Props {
  readonly hits: HitMap;
  readonly requesters: RequesterMap;
  readonly emptyAction: () => void;
}

const HitTable = ({ hits, requesters, emptyAction }: Props) => {
  const sortedHits = (unsortedHits: HitMap) =>
    unsortedHits.sort(sortByTime).toArray().slice(0, 50);

  return hits.isEmpty() ? (
    <EmptyHitTable onAction={emptyAction} />
  ) : (
    <ResourceList
      items={sortedHits(hits)}
      renderItem={(hit: Hit) => (
        <HitItem hit={hit} requester={requesters.get(hit.requesterId)} />
      )}
    />
  );
};

export default HitTable;<commit_msg>ResourceList is now inside of a Card.<commit_after>import * as React from 'react';
import { Hit, HitMap, RequesterMap } from '../../types';
import { Card, ResourceList } from '@shopify/polaris';
// import HitCard from './HitCard';
import HitItem from './HitItem';
import EmptyHitTable from './EmptyHitTable';

import { sortByTime } from '../../utils/sorting';

export interface Props {
  readonly hits: HitMap;
  readonly requesters: RequesterMap;
  readonly emptyAction: () => void;
}

const HitTable = ({ hits, requesters, emptyAction }: Props) => {
  const sortedHits = (unsortedHits: HitMap) =>
    unsortedHits.sort(sortByTime).toArray().slice(0, 50);

  return hits.isEmpty() ? (
    <EmptyHitTable onAction={emptyAction} />
  ) : (
    <Card>
      <ResourceList
        items={sortedHits(hits)}
        renderItem={(hit: Hit) => (
          <HitItem hit={hit} requester={requesters.get(hit.requesterId)} />
        )}
      />
    </Card>
  );
};

export default HitTable;
{'fraction_non_alphanumeric': 0.15778364116094987, 'fraction_numerical': 0.0031662269129287598, 'mean_word_length': 3.5576923076923075, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '7133295', 'n_tokens_mistral': 612, 'n_tokens_neox': 598, 'n_words': 146}