<commit_before>import { combineReducers } from 'redux'
import { WS_MSG } from './actions'

function auth(state = {isAuthenticated: false}, action) {
  switch (action.type) {
    case WS_MSG:
      let msg = action.msg
      switch (msg.type) {
        case "valid_login":
          return {
            ...state,
            isAuthenticated: true
          }
        default:
          break
      }
      break
    default:
      break
  }
  return state;
}

const tarabishApp = combineReducers({
  auth
})

export default tarabishApp<commit_msg>Add a tables reducer to the lobby table list.<commit_after>import { combineReducers } from 'redux'
import { WS_MSG } from './actions'


// TODO: Should just one reducer accept WS_MSG
// and repack the message and resend them?

function auth(state = {isAuthenticated: false}, action) {
  switch (action.type) {
    case WS_MSG:
      let msg = action.msg
      switch (msg.type) {
        case "valid_login":
          return {
            ...state,
            isAuthenticated: true
          }
        default:
          break
      }
      break
    default:
      break
  }
  return state;
}

function tables(state = {tableList: []}, action) {
  switch (action.type) {
    // get-tables, sit, stand...
    case WS_MSG:
      let msg = action.msg
      switch (msg.type) {
        case "tables":
          return {
            ...state,
            tableList: msg.tables,
          }
        default:
          break
      }
      break
    default:
      break
  }
  return state;
}


const tarabishApp = combineReducers({
  auth,
  tables
})

export default tarabishApp
{'fraction_non_alphanumeric': 0.09938271604938272, 'fraction_numerical': 0.0, 'mean_word_length': 1.8093587521663779, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, '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': '3488632', 'n_tokens_mistral': 497, 'n_tokens_neox': 488, 'n_words': 135}