<commit_before>import React from 'react'
import { AuthContext } from './Context'

const auth = () => Component => (props) => (
  <AuthContext.Consumer>
    {user => (<Component user={user} {...props} />)}
  </AuthContext.Consumer>
)

export default auth
<commit_msg>feat(admin-canary): add logout in auth hoc<commit_after>import React from 'react'
import { connect } from '../../redux'
import AuthAPI from '../api'
import { AuthContext } from './Context'

const auth = () => Component => (props) => {
  
  const ComponentRedux = connect(undefined, { logout: AuthAPI.logout })(Component)

  return (
    <AuthContext.Consumer>
      {user => (<ComponentRedux user={user} {...props} />)}
    </AuthContext.Consumer>
  )
}
export default auth

{'fraction_non_alphanumeric': 0.17162162162162162, 'fraction_numerical': 0.0, 'mean_word_length': 3.7806451612903227, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '4738538', 'n_tokens_mistral': 227, 'n_tokens_neox': 223, 'n_words': 62}