<commit_before>const reviews = (state=[], action) => {
  switch (action.type) {
    case 'ADD_REVIEW':
      return [
        ...state, {
          id: action.id,
          item_id: action.item_id,
          reviewer: action.reviewer,
          text: action.text,
          rating: action.rating,
          flag: false
        }
      ]
    case 'DELETE_REVIEW':
      return state.filter(review => review.id !== action.id);
    case 'FLAG_REVIEW':
      return state.map(review => review.id === action.id ? Object.assign({}, review, { flag: action.flag}): review)
    case 'RATE_REVIEW':
      return state.map(review => review.id === action.id ? {...review, rating: action.rating }: review)
    default:
      return state;
  }
}<commit_msg>[Chore] Use types from file<commit_after>import types from '../../actionTypes';

const reviews = (state=[], action) => {
  switch (action.type) {
    case types.reviews.ADD_REVIEW:
      return [
        ...state, {
          id: action.id,
          item_id: action.item_id,
          reviewer: action.reviewer,
          text: action.text,
          rating: action.rating,
          flag: false
        }
      ]
    case types.reviews.DELETE_REVIEW:
      return state.filter(review => review.id !== action.id);
    case types.reviews.FLAG_REVIEW:
      return state.map(review => review.id === action.id ? Object.assign({}, review, { flag: action.flag}): review)
    case types.reviews.RATE_REVIEW:
      return state.map(review => review.id === action.id ? {...review, rating: action.rating }: review)
    default:
      return sretate;
  }
}
{'fraction_non_alphanumeric': 0.14654088050314465, 'fraction_numerical': 0.0, 'mean_word_length': 2.2736625514403292, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5973647', 'n_tokens_mistral': 487, 'n_tokens_neox': 485, 'n_words': 112}