<commit_before>kd = require 'kd'
React = require 'app/react'
View = require './view'
TeamFlux = require 'app/flux/teams'
KDReactorMixin = require 'app/flux/base/reactormixin'


module.exports = class ApiAccessContainer extends React.Component

  getDataBindings: ->

    return {
      team: TeamFlux.getters.team
      apiTokens: TeamFlux.getters.apiTokens
      apiAccessState: TeamFlux.getters.apiAccessState
    }

  componentWillMount: ->

    TeamFlux.actions.fetchApiTokens()
    TeamFlux.actions.fetchCurrentStateOfApiAccess()


  constructor: (props) ->

    super props

  render: ->

    <View
      apiTokens={@state.apiTokens}
      apiAccessState={@state.apiAccessState}/>

ApiAccessContainer.include [KDReactorMixin]
<commit_msg>ApiAccess: fix initial state issue on api toggle<commit_after>kd = require 'kd'
React = require 'app/react'
View = require './view'
TeamFlux = require 'app/flux/teams'
KDReactorMixin = require 'app/flux/base/reactormixin'


module.exports = class ApiAccessContainer extends React.Component

  getDataBindings: ->

    return {
      team: TeamFlux.getters.team
      apiTokens: TeamFlux.getters.apiTokens
      apiAccessState: TeamFlux.getters.apiAccessState
    }

  componentDidMount: ->

    TeamFlux.actions.fetchApiTokens()
    TeamFlux.actions.fetchCurrentStateOfApiAccess()


  constructor: (props) ->

    super props

  render: ->

    <View
      apiTokens={@state.apiTokens}
      apiAccessState={@state.apiAccessState}/>

ApiAccessContainer.include [KDReactorMixin]

{'fraction_non_alphanumeric': 0.10315374507227333, 'fraction_numerical': 0.0, 'mean_word_length': 3.789308176100629, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '2652120', 'n_tokens_mistral': 502, 'n_tokens_neox': 487, 'n_words': 89}