<commit_before>import React from 'react'
import { connect } from 'react-redux'

import { INTERACTIONS__LOADED } from '../../../client/actions'
import { INTERACTION, SERVICE_DELIVERY } from './constants'

import {
  FilteredCollectionList,
  RoutedCheckboxGroupField,
  CollectionFilters,
} from '../../../client/components'

import { ID, state2props, TASK_GET_INTERACTIONS_LIST } from './state'

const InteractionCollection = ({
  payload,
  optionMetadata,
  selectedFilters,
  ...props
}) => {
  const collectionListTask = {
    name: TASK_GET_INTERACTIONS_LIST,
    id: ID,
    progressMessage: 'loading interactions',
    startOnRender: {
      payload,
      onSuccessDispatch: INTERACTIONS__LOADED,
    },
  }
  return (
    <FilteredCollectionList
      {...props}
      collectionName={INTERACTION.label}
      sortOptions={optionMetadata.sortOptions}
      taskProps={collectionListTask}
      selectedFilters={selectedFilters}
      baseDownloadLink="/interactions/export"
      entityName="interactions"
      defaultQueryParams={{
        sortby: 'date:desc',
        page: 1,
      }}
    >
      <CollectionFilters>
        <RoutedCheckboxGroupField
          legend="Kind"
          name="kind"
          qsParam="kind"
          options={[
            {
              label: INTERACTION.label,
              value: INTERACTION.value,
            },
            {
              label: SERVICE_DELIVERY.label,
              value: SERVICE_DELIVERY.value,
            },
          ]}
          selectedOptions={selectedFilters.selectedKind}
          data-test="status-filter"
        />
      </CollectionFilters>
    </FilteredCollectionList>
  )
}

export default connect(state2props)(InteractionCollection)
<commit_msg>Use constant instead of string<commit_after>import React from 'react'
import { connect } from 'react-redux'

import { INTERACTIONS__LOADED } from '../../../client/actions'
import { INTERACTION, SERVICE_DELIVERY, KIND } from './constants'

import {
  FilteredCollectionList,
  RoutedCheckboxGroupField,
  CollectionFilters,
} from '../../../client/components'

import { ID, state2props, TASK_GET_INTERACTIONS_LIST } from './state'

const InteractionCollection = ({
  payload,
  optionMetadata,
  selectedFilters,
  ...props
}) => {
  const collectionListTask = {
    name: TASK_GET_INTERACTIONS_LIST,
    id: ID,
    progressMessage: 'loading interactions',
    startOnRender: {
      payload,
      onSuccessDispatch: INTERACTIONS__LOADED,
    },
  }
  return (
    <FilteredCollectionList
      {...props}
      collectionName={INTERACTION.label}
      sortOptions={optionMetadata.sortOptions}
      taskProps={collectionListTask}
      selectedFilters={selectedFilters}
      baseDownloadLink="/interactions/export"
      entityName="interactions"
      defaultQueryParams={{
        sortby: 'date:desc',
        page: 1,
      }}
    >
      <CollectionFilters>
        <RoutedCheckboxGroupField
          legend={KIND}
          name="kind"
          qsParam="kind"
          options={[
            {
              label: INTERACTION.label,
              value: INTERACTION.value,
            },
            {
              label: SERVICE_DELIVERY.label,
              value: SERVICE_DELIVERY.value,
            },
          ]}
          selectedOptions={selectedFilters.selectedKind}
          data-test="status-filter"
        />
      </CollectionFilters>
    </FilteredCollectionList>
  )
}

export default connect(state2props)(InteractionCollection)

{'fraction_non_alphanumeric': 0.10786838340486408, 'fraction_numerical': 0.0017167381974248926, 'mean_word_length': 2.4613861386138614, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3015545', 'n_tokens_mistral': 984, 'n_tokens_neox': 979, 'n_words': 171}