<commit_before>import {
  HashRouter as Router,
  Route,
  Redirect,
} from 'react-router-dom';
import React from 'react';

const MainRoutes = () => {
  <Router>
    <SideNav />
    <Route
      exact
      path="/"
      component={() => (
        <Redirect to="/rants" />
      )}
    />
    <Route path="/rants" component={Rants} />
    <Route path="/weekly" component={Weekly} />
    <Route path="/stories" component={Stories} />
    <Route path="/collabs" component={Collabs} />
    <Route path="/settings" component={Settings} />
    <SideColumn />
    <Notifications />
  </Router>;
};

const AuthRoutes = () => {
  <Router>
    <Route exact path="/" component={Auth} />
  </Router>;
};

const Routes = (props) => {
  if (!props.auth.user || !props.settings.noLogin) {
    return AuthRoutes;
  }
  return MainRoutes;
};
<commit_msg>simplified route<commit_after>import React from 'react';
import {
  HashRouter as Router,
  Route,
  Redirect,
} from 'react-router-dom';
import { connect } from 'react-redux';
import Auth from './containers/auth/auth';
import Toast from './containers/utilities/toast/toast';

/* const MainRoutes = () => {
  <Router>
    <SideNav />
    <Route
      exact
      path="/"
      component={() => (
        <Redirect to="/rants" />
      )}
    />
    <Route path="/rants" component={Rants} />
    <Route path="/weekly" component={Weekly} />
    <Route path="/stories" component={Stories} />
    <Route path="/collabs" component={Collabs} />
    <Route path="/settings" component={Settings} />
    <SideColumn />
    <Notifications />
  </Router>;
};*/

const AuthRoutes = (
  <Router>
    <div>
      <Route exact path="/" component={Auth} />
      <Toast />
    </div>
  </Router>
);

const Routes = (props) => {
  if (!props.auth.user) {
    return AuthRoutes;
  }
  return AuthRoutes;
};

const mapStateToProps = state => ({
  auth: state.auth,
});


export default connect(mapStateToProps, null)(Routes);

{'fraction_non_alphanumeric': 0.18284540318438625, 'fraction_numerical': 0.0, 'mean_word_length': 2.849802371541502, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 44, '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': '3678699', 'n_tokens_mistral': 646, 'n_tokens_neox': 636, 'n_words': 140}