<commit_before>import React from 'react';

import moment from 'moment';
import formatFileSize from 'filesize';

// import { LoadingIndicator } from './LoadingIndicator';


interface Props {
  fileName: string | null;
  fileSize?: number;
  i18n: (key: string, values?: Array<string>) => string;
  timestamp: number;
}

const styles = {
  container: {
    width: '100%',
    height: 72,
    borderBottomWidth: 1,
    borderBottomColor: '#ccc',
    borderBottomStyle: 'solid',
  },
  itemContainer: {
    display: 'flex',
    flexDirection: 'row',
    flexWrap: 'nowrap',
    alignItems: 'center',
    height: '100%',
  } as React.CSSProperties,
  itemMetadata: {
    display: 'inline-flex',
    flexDirection: 'column',
    flexGrow: 1,
    flexShrink: 0,
    marginLeft: 8,
    marginRight: 8,
  } as React.CSSProperties,
  itemDate: {
    display: 'inline-block',
    flexShrink: 0,
  },
  itemIcon: {
    flexShrink: 0,
  },
  itemFileSize: {
    display: 'inline-block',
    marginTop: 8,
    fontSize: '80%',
  },
};

export class DocumentListEntry extends React.Component<Props, {}> {
  public renderContent() {
    const { fileName, fileSize, timestamp } = this.props;

    // if (!attachment.data) {
    //   return <LoadingIndicator />;
    // }

    return (
      <div
        style={styles.itemContainer}
      >
        <img
          src="images/file.svg"
          width="48"
          height="48"
          style={styles.itemIcon}
        />
        <div
          style={styles.itemMetadata}
        >
          <strong>{fileName}</strong>
          <span
            style={styles.itemFileSize}
          >
            {typeof fileSize === 'number' ? formatFileSize(fileSize) : ''}
          </span>
        </div>
        <div
          style={styles.itemDate}
        >
          {moment(timestamp).format('dddd, MMMM D, Y')}
        </div>
      </div>
    );
  }

  public render() {<commit_msg>Use short format for dates<commit_after>import React from 'react';

import moment from 'moment';
import formatFileSize from 'filesize';

// import { LoadingIndicator } from './LoadingIndicator';


interface Props {
  fileName: string | null;
  fileSize?: number;
  i18n: (key: string, values?: Array<string>) => string;
  timestamp: number;
}

const styles = {
  container: {
    width: '100%',
    height: 72,
    borderBottomWidth: 1,
    borderBottomColor: '#ccc',
    borderBottomStyle: 'solid',
  },
  itemContainer: {
    display: 'flex',
    flexDirection: 'row',
    flexWrap: 'nowrap',
    alignItems: 'center',
    height: '100%',
  } as React.CSSProperties,
  itemMetadata: {
    display: 'inline-flex',
    flexDirection: 'column',
    flexGrow: 1,
    flexShrink: 0,
    marginLeft: 8,
    marginRight: 8,
  } as React.CSSProperties,
  itemDate: {
    display: 'inline-block',
    flexShrink: 0,
  },
  itemIcon: {
    flexShrink: 0,
  },
  itemFileSize: {
    display: 'inline-block',
    marginTop: 8,
    fontSize: '80%',
  },
};

export class DocumentListEntry extends React.Component<Props, {}> {
  public renderContent() {
    const { fileName, fileSize, timestamp } = this.props;

    // if (!attachment.data) {
    //   return <LoadingIndicator />;
    // }

    return (
      <div
        style={styles.itemContainer}
      >
        <img
          src="images/file.svg"
          width="48"
          height="48"
          style={styles.itemIcon}
        />
        <div
          style={styles.itemMetadata}
        >
          <strong>{fileName}</strong>
          <span
            style={styles.itemFileSize}
          >
            {typeof fileSize === 'number' ? formatFileSize(fileSize) : ''}
          </span>
        </div>
        <div
          style={styles.itemDate}
        >
          {moment(timestamp).format('ddd, MMM D, Y')}
        </div>
      </div>
    );
  }

  public render() {
{'fraction_non_alphanumeric': 0.14311735623211033, 'fraction_numerical': 0.01249024199843872, 'mean_word_length': 2.211361737677527, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, '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': '2403224', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1217, 'n_words': 268}