<commit_before>import React from 'react'
import PropTypes from 'prop-types'
import MailRead from './MailRead'
import MailUnread from './MailUnread'
import { keysrt, convertDateToMs, convertDateToFormat, getMail } from '../modules/methods'
import './EmailView.scss'

export const Email = ({ messages, markRead, markUnread }) => {
  convertDateToMs(messages)
  return (
    <div className='containerEmail'>
      <MailUnread
        messages={convertDateToFormat(getMail(messages, true).sort(keysrt('date')).reverse())}
        handleClick={markRead} />
      <MailRead
        messages={convertDateToFormat(getMail(messages, false).sort(keysrt('date')).reverse())}
        handleClick={markUnread} />
    </div>
  )
}

Email.propTypes = {
  messages: PropTypes.array.isRequired,
  markRead: PropTypes.func.isRequired,
  markUnread: PropTypes.func.isRequired,
}

export default Email
<commit_msg>convertDateToMS now called in prop<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import MailRead from './MailRead'
import MailUnread from './MailUnread'
import { keysrt, convertDateToMs, convertDateToFormat, getMail } from '../modules/methods'
import './EmailView.scss'

export const Email = ({ messages, markRead, markUnread }) => {
  return (
    <div className='containerEmail'>
      <MailUnread
        messages={convertDateToFormat(convertDateToMs(getMail(messages, true).sort(keysrt('date')).reverse()))}
        handleClick={markRead} />
      <MailRead
        messages={convertDateToFormat(convertDateToMs(getMail(messages, false).sort(keysrt('date')).reverse()))}
        handleClick={markUnread} />
    </div>
  )
}

Email.propTypes = {
  messages: PropTypes.array.isRequired,
  markRead: PropTypes.func.isRequired,
  markUnread: PropTypes.func.isRequired,
}

export default Email

{'fraction_non_alphanumeric': 0.1322314049586777, 'fraction_numerical': 0.0, 'mean_word_length': 4.570552147239264, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2999088', 'n_tokens_mistral': 531, 'n_tokens_neox': 542, 'n_words': 111}