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

import Header from './Header.jsx';
import Portfolio from './Portfolio.jsx';
import SignUpPage from './SignUp/SignUpPage.jsx';
import LoginPage from './Login/LoginPage.jsx';
import NotFoundPage from './NotFoundPage.jsx';
import Auth from '../services/Auth';


// https://reacttraining.com/react-router/web/example/auth-workflow
const PrivateRoute = ({ component: Component, ...rest }) => {
    console.log(rest);
    return (
        <Route {...rest} render={props => (
            Auth.loggedIn() ? (
                <Component {...props} />
            ) : (
                    <Redirect to={{
                        pathname: '/login',
                        state: { from: props.location }
                    }} />
                )
        )} />
    );
};

// This is a class-based component because the current
// version of hot reloading won't hot reload a stateless
// component at the top-level.
class App extends React.Component {
    render() {
        return (
            <div>
                <Header />
                <div className="layout-main-content">
                    <Switch>
                        <Route exact path="/" render={() => <Redirect to="/portfolio/performance" />} />
                        <PrivateRoute path="/portfolio" component={Portfolio} />
                        <Route path="/signup" component={SignUpPage} /><commit_msg>Remove a left over console.log<commit_after>import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';

import Header from './Header.jsx';
import Portfolio from './Portfolio.jsx';
import SignUpPage from './SignUp/SignUpPage.jsx';
import LoginPage from './Login/LoginPage.jsx';
import NotFoundPage from './NotFoundPage.jsx';
import Auth from '../services/Auth';


// https://reacttraining.com/react-router/web/example/auth-workflow
const PrivateRoute = ({ component: Component, ...rest }) => {
    return (
        <Route {...rest} render={props => (
            Auth.loggedIn() ? (
                <Component {...props} />
            ) : (
                    <Redirect to={{
                        pathname: '/login',
                        state: { from: props.location }
                    }} />
                )
        )} />
    );
};

// This is a class-based component because the current
// version of hot reloading won't hot reload a stateless
// component at the top-level.
class App extends React.Component {
    render() {
        return (
            <div>
                <Header />
                <div className="layout-main-content">
                    <Switch>
                        <Route exact path="/" render={() => <Redirect to="/portfolio/performance" />} />
                        <PrivateRoute path="/portfolio" component={Portfolio} />
                        <Route path="/signup" component={SignUpPage} />
{'fraction_non_alphanumeric': 0.1415478615071283, 'fraction_numerical': 0.0, 'mean_word_length': 1.769736842105263, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 31, 'https://': 2, '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': '4527247', 'n_tokens_mistral': 773, 'n_tokens_neox': 741, 'n_words': 201}