<commit_before>// @flow
import * as React from 'react'
import {Text, ScrollView, StyleSheet} from 'react-native'
import {email} from 'react-native-communications'
import {Cell, Section, TableView} from 'react-native-tableview-simple'
import moment from 'moment'
import openUrl from '../../components/open-url'
import * as c from '../../components/colors'
import type {JobType} from './types'
import {cleanJob, getContactName, getLinksFromJob} from './clean-job'
import {SelectableCell} from './selectable'
import glamorous from 'glamorous-native'

const styles = StyleSheet.create({
  lastUpdated: {
    paddingBottom: 20,
  },
  footer: {
    fontSize: 10,
    color: c.iosDisabledText,
    textAlign: 'center',
  },
})

const Title = glamorous.text({
  fontSize: 36,
  textAlign: 'center',
  marginHorizontal: 18,
  marginVertical: 10,
})

function Information({job}: {job: JobType}) {
  const office = job.office ? (
    <Cell cellStyle="LeftDetail" detail="Office" title={job.office} />
  ) : null

  const contact = job.contactEmail ? (
    <Cell
      accessory="DisclosureIndicator"
      cellStyle="LeftDetail"
      detail={'Contact'}
      onPress={() => email([job.contactEmail], null, null, job.title, '')}
      title={getContactName(job).trim() || job.contactEmail}
    />
  ) : null

  const ending = job.hoursPerWeek == 'Full-time' ? '' : ' hrs/week'
  const hours = job.hoursPerWeek ? (
    <Cell
      cellStyle="LeftDetail"
      detail={'Hours'}
      title={job.hoursPerWeek + ending}
    />
  ) : null

  const amount = job.timeOfHours ? (
    <Cell
      cellStyle="LeftDetail"
      detail={'Time of Day'}
      title={job.timeOfHours}
    />
  ) : null

  const category = job.type ? (
    <Cell cellStyle="LeftDetail" detail={'Category'} title={job.type} />
  ) : null

  return (
    <Section header="INFORMATION">
      {office}
      {contact}
      {hours}
      {amount}
      {category}
    </Section>
  )
}

function Description({job}: {job: JobType}) {
  return job.description ? (
    <Section header="DESCRIPTION">
      <SelectableCell text={job.description} /><commit_msg>remove {''} strings in student work detail view<commit_after>// @flow
import * as React from 'react'
import {Text, ScrollView, StyleSheet} from 'react-native'
import {email} from 'react-native-communications'
import {Cell, Section, TableView} from 'react-native-tableview-simple'
import moment from 'moment'
import openUrl from '../../components/open-url'
import * as c from '../../components/colors'
import type {JobType} from './types'
import {cleanJob, getContactName, getLinksFromJob} from './clean-job'
import {SelectableCell} from './selectable'
import glamorous from 'glamorous-native'

const styles = StyleSheet.create({
  lastUpdated: {
    paddingBottom: 20,
  },
  footer: {
    fontSize: 10,
    color: c.iosDisabledText,
    textAlign: 'center',
  },
})

const Title = glamorous.text({
  fontSize: 36,
  textAlign: 'center',
  marginHorizontal: 18,
  marginVertical: 10,
})

function Information({job}: {job: JobType}) {
  const office = job.office ? (
    <Cell cellStyle="LeftDetail" detail="Office" title={job.office} />
  ) : null

  const contact = job.contactEmail ? (
    <Cell
      accessory="DisclosureIndicator"
      cellStyle="LeftDetail"
      detail="Contact"
      onPress={() => email([job.contactEmail], null, null, job.title, '')}
      title={getContactName(job).trim() || job.contactEmail}
    />
  ) : null

  const ending = job.hoursPerWeek == 'Full-time' ? '' : ' hrs/week'
  const hours = job.hoursPerWeek ? (
    <Cell
      cellStyle="LeftDetail"
      detail="Hours"
      title={job.hoursPerWeek + ending}
    />
  ) : null

  const amount = job.timeOfHours ? (
    <Cell cellStyle="LeftDetail" detail="Time of Day" title={job.timeOfHours} />
  ) : null

  const category = job.type ? (
    <Cell cellStyle="LeftDetail" detail="Category" title={job.type} />
  ) : null

  return (
    <Section header="INFORMATION">
      {office}
      {contact}
      {hours}
      {amount}
      {category}
    </Section>
  )
}

function Description({job}: {job: JobType}) {
  return job.description ? (
    <Section header="DESCRIPTION">
      <SelectableCell text={job.description} />
{'fraction_non_alphanumeric': 0.15009469696969696, 'fraction_numerical': 0.004734848484848485, 'mean_word_length': 3.391891891891892, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '302', 'n_tokens_mistral': 1364, 'n_tokens_neox': 1314, 'n_words': 320}