<commit_before>import React from 'react';
import { Container } from 'flux/utils';

import ContactView from './ContactView.jsx';
import ListView from './ListView.jsx';
import LoginView from './LoginView.jsx';
import Menu from './Menu.jsx';

import { AppStore } from '../stores';

class MainContainer extends React.Component {
  static getStores() {
    return [AppStore];
  }

  static calculateState() {
    const appState = AppStore.get();
    appState.showContact = !!appState.selected;
    appState.showLogin = appState.employer.status !== 'signedIn';
    appState.showList = appState.employer.status === 'signedIn'
      && !appState.showContact;

    if (this.state.showContact) {
      appState.viewMode = 'contact';
    } else if (this.state.showList) {
      appState.viewMode = 'list';
    } else {
      appState.viewMode = 'login';
    }

    return appState;
  }

  render() {
    return (
      <div className="container">
        <Menu
          view={this.state.viewMode}
          dirty={this.state.selected && this.state.selected.status === 'dirty'}
          showDelete={!!this.state.selected && !!this.state.selected.id}
        />
        <ContactView
          contact={this.state.selected}
          visible={this.state.showContact}
        />
        <LoginView
          userName={this.state.employer.userName}
          password={<PASSWORD>}
          visible={this.state.showLogin}<commit_msg>fix error<commit_after>import React from 'react';
import { Container } from 'flux/utils';

import ContactView from './ContactView.jsx';
import ListView from './ListView.jsx';
import LoginView from './LoginView.jsx';
import Menu from './Menu.jsx';

import { AppStore } from '../stores';

class MainContainer extends React.Component {
  static getStores() {
    return [AppStore];
  }

  static calculateState() {
    const appState = AppStore.get();
    appState.showContact = !!appState.selected;
    appState.showLogin = appState.employer.status !== 'signedIn';
    appState.showList = appState.employer.status === 'signedIn'
      && !appState.showContact;

    if (appState.showContact) {
      appState.viewMode = 'contact';
    } else if (appState.showList) {
      appState.viewMode = 'list';
    } else {
      appState.viewMode = 'login';
    }

    return appState;
  }

  render() {
    return (
      <div className="container">
        <Menu
          view={this.state.viewMode}
          dirty={this.state.selected && this.state.selected.status === 'dirty'}
          showDelete={!!this.state.selected && !!this.state.selected.id}
        />
        <ContactView
          contact={this.state.selected}
          visible={this.state.showContact}
        />
        <LoginView
          userName={this.state.employer.userName}
          password={<PASSWORD>}
          visible={this.state.showLogin}
{'fraction_non_alphanumeric': 0.1392226148409894, 'fraction_numerical': 0.0, 'mean_word_length': 2.715223097112861, 'pattern_counts': {'":': 0, '<': 13, '<?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': '4929591', 'n_tokens_mistral': 850, 'n_tokens_neox': 828, 'n_words': 164}