<commit_before>import React, { Component } from 'react';
import screenfull from 'screenfull';
import KeyCapture from 'components/KeyCapture';
import Header from 'components/Header';
import { Switch, Route, Redirect } from 'react-router';
import Week from 'containers/WeekContainer';
import NotFound from 'components/NotFound';

import MobileStatus from 'containers/MobileStatusContainer';
import Info from 'containers/InfoContainer';
import ProjectMatrix from 'containers/ProjectMatrixContainer';
import PeopleView from 'containers/PeopleViewContainer';
import ProjectView from 'containers/ProjectViewContainer';
import Menu from 'components/Menu';
import WeeklyMatrix from 'containers/WeeklyMatrixContainer';


import styles from './App.pcss';

export default class App extends Component {
  componentDidMount() {
    const {
      d,
      employeeActions,
      entryActions,
      projectActions,
      employeeProjectActions,
    } = this.props;

    employeeActions.fetchEmployees();
    entryActions.fetchEntries(d);
    projectActions.fetchProjects();
    employeeProjectActions.fetchEmployeeProjects();

    this.reactivizer = setTimeout(() => {
      entryActions.fetchEntries(d);
    }, 60000);
  }

  componentDidUpdate(prevProps, prevState) {
    const { d, entryActions } = this.props;

    if (d !== prevProps.d) {
      entryActions.fetchEntries(d);
    }
  }

  componentWillUnmount() {
    clearInterval(this.reactivizer);
  }

  toggleFullScreen() {
    screenfull.toggle();
  }

  render() {
    const {
      d,
      entryActions,
      match,
    } = this.props;

    const location = document.location;

    let renderWeekSelector = false;
    switch (location.pathname) {
      case '/people':
      case '/projects':
        renderWeekSelector = true;
        break;
      default:
        break;
    }

    return (
      <div>
        <Header renderWeekSelector={renderWeekSelector} date={d} onChange={entryActions.changeWeek} /><commit_msg>Unused import removed in App.js. Refactored weekSelector conditional logic.<commit_after>import React, { Component } from 'react';
import screenfull from 'screenfull';
import KeyCapture from 'components/KeyCapture';
import Header from 'components/Header';
import { Switch, Route, Redirect } from 'react-router';
import Week from 'containers/WeekContainer';
import NotFound from 'components/NotFound';

import MobileStatus from 'containers/MobileStatusContainer';
import Info from 'containers/InfoContainer';
import PeopleView from 'containers/PeopleViewContainer';
import ProjectView from 'containers/ProjectViewContainer';
import Menu from 'components/Menu';
import WeeklyMatrix from 'containers/WeeklyMatrixContainer';


import styles from './App.pcss';

export default class App extends Component {
  componentDidMount() {
    const {
      d,
      employeeActions,
      entryActions,
      projectActions,
      employeeProjectActions,
    } = this.props;

    employeeActions.fetchEmployees();
    entryActions.fetchEntries(d);
    projectActions.fetchProjects();
    employeeProjectActions.fetchEmployeeProjects();

    this.reactivizer = setTimeout(() => {
      entryActions.fetchEntries(d);
    }, 60000);
  }

  componentDidUpdate(prevProps, prevState) {
    const { d, entryActions } = this.props;

    if (d !== prevProps.d) {
      entryActions.fetchEntries(d);
    }
  }

  componentWillUnmount() {
    clearInterval(this.reactivizer);
  }

  toggleFullScreen() {
    screenfull.toggle();
  }

  render() {
    const {
      d,
      entryActions,
      match,
    } = this.props;

    const pathname = document.location.pathname;

    const weekSelectorPaths = [
      '/people',
      '/projects',
    ];

    const renderWeekSelector = weekSelectorPaths.indexOf(pathname) !== -1;

    return (
      <div>
        <Header renderWeekSelector={renderWeekSelector} date={d} onChange={entryActions.changeWeek} />
{'fraction_non_alphanumeric': 0.10600616016427104, 'fraction_numerical': 0.0028234086242299797, 'mean_word_length': 3.712212817412334, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1977785', 'n_tokens_mistral': 1084, 'n_tokens_neox': 1048, 'n_words': 254}