<commit_before>var React = require('react');
var Logger = require('logarama');
var Router = require('react-router');
var $ = require('jquery');

var { Route, DefaultRoute, RouteHandler } = Router;

// Flux
import FluxComponent from 'flummox/component';
import FluxManager from './data/index';


var Layout = require('./ui/layout');
var EntriesView = require('./ui/pages/entries');
var NewEntry = require('./ui/pages/newEntry');
var SettingsView = require('./ui/pages/settings/index');




var App = React.createClass({
  getInitialState: function() {
    var logger = new Logger({
      minLevel: 'info'
    });

    return {
      logger: logger,
      flux: new FluxManager(logger)
    };
  },

  render: function() {
    return (
      <FluxComponent flux={this.state.flux} connectToStores={{
        user: store => ({
          entriesLoaded: !!store.state.entriesLoaded,
          passwordEntered: !!store.state.derivedKeys,
          userAlertMsg: store.state.userAlertMsg,
          userAlertType: store.state.userAlertType,
        }),
      }}>
        <Layout {...this.props}>
          <RouteHandler {...this.props}/>
        </Layout>
      </FluxComponent>
    );
  }
});



var routes = (
  <Route handler={App}>
    <DefaultRoute name="newEntry" handler={NewEntry} />
    <Route name="entries" path="/entries/:entryId?" handler={EntriesView} />
    <Route name="settings" path="/settings" handler={SettingsView} />
  </Route>
);


Router.run(routes, Router.HashLocation, function(Handler, state) {
  React.render(
    <Handler routes={state.routes} params={state.params} query={state.query} />, <commit_msg>timeline view is now default view<commit_after>var React = require('react');
var Logger = require('logarama');
var Router = require('react-router');
var $ = require('jquery');

var { Route, DefaultRoute, RouteHandler } = Router;

// Flux
import FluxComponent from 'flummox/component';
import FluxManager from './data/index';


var Layout = require('./ui/layout');
var EntriesView = require('./ui/pages/entries');
var NewEntry = require('./ui/pages/newEntry');
var SettingsView = require('./ui/pages/settings/index');




var App = React.createClass({
  getInitialState: function() {
    var logger = new Logger({
      minLevel: 'info'
    });

    return {
      logger: logger,
      flux: new FluxManager(logger)
    };
  },

  render: function() {
    return (
      <FluxComponent flux={this.state.flux} connectToStores={{
        user: store => ({
          entriesLoaded: !!store.state.entriesLoaded,
          passwordEntered: !!store.state.derivedKeys,
          userAlertMsg: store.state.userAlertMsg,
          userAlertType: store.state.userAlertType,
        }),
      }}>
        <Layout {...this.props}>
          <RouteHandler {...this.props}/>
        </Layout>
      </FluxComponent>
    );
  }
});



var routes = (
  <Route handler={App}>
    <DefaultRoute name="entries" path="/entries/:entryId?" handler={EntriesView} />
    <Route name="newEntry" path="/newEntry" handler={NewEntry} />
    <Route name="settings" path="/settings" handler={SettingsView} />
  </Route>
);


Router.run(routes, Router.HashLocation, function(Handler, state) {
  React.render(
    <Handler routes={state.routes} params={state.params} query={state.query} />, 
{'fraction_non_alphanumeric': 0.16275525754343187, 'fraction_numerical': 0.0, 'mean_word_length': 3.229381443298969, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, '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': '4959202', 'n_tokens_mistral': 989, 'n_tokens_neox': 974, 'n_words': 208}