<commit_before>import React from 'react';
import {
  BrowserRouter as Router,
  Route,
  Switch
} from 'react-router-dom';
import firebase from 'firebase';
import { NavigationBar } from '../NavigationBar';
import { PageHome } from '../PageHome';
import { PageLogin } from '../PageLogin';
import { PageAdmin } from '../PageAdmin';
import { NoRouteMatch } from '../NoRouteMatch';
import { SecuredRoute } from './SecuredRoute';
import { UnsecuredRoute } from './UnsecuredRoute';

class PageRouter extends React.Component {
    componentDidMount() {
        firebase.auth().onAuthStateChanged( user => {
            if ( user ) {
                //
            } else {
                //
            }
        });
    }
    render() {
        return (
            <Router>
                <div>
                    <NavigationBar />

                    <Switch>
                        <Route exact path="/" component={PageHome}/>
                        <UnsecuredRoute path="/login" component={PageLogin}/>
                        <SecuredRoute path="/admin" component={PageAdmin}/>
                        <Route component={NoRouteMatch}/>
                    </Switch>
                </div><commit_msg>Move PageRouter component to own file<commit_after>import React from 'react';
import {
  BrowserRouter as Router,
  Route,
  Switch
} from 'react-router-dom';
import firebase from 'firebase';
import { NavigationBar } from '../NavigationBar';
import { PageHome } from '../PageHome';
import { PageSignin, PageSignout } from '../PageSign';
import { PageAdmin } from '../PageAdmin';
import { NoRouteMatch } from '../NoRouteMatch';
import { SecuredRoute } from './SecuredRoute';
import { UnsecuredRoute } from './UnsecuredRoute';

class PageRouter extends React.Component {
    render() {
        return (
            <Router>
                <div>
                    <NavigationBar />

                    <Switch>
                        <Route exact path="/" component={PageHome}/>
                        <UnsecuredRoute path="/signin" component={PageSignin}/>
                        <SecuredRoute path="/signout" component={PageSignout}/>
                        <SecuredRoute path="/admin" component={PageAdmin}/>
                        <Route component={NoRouteMatch}/>
                    </Switch>
                </div>
{'fraction_non_alphanumeric': 0.1260720411663808, 'fraction_numerical': 0.0, 'mean_word_length': 1.8074608904933815, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 25, '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': '5615129', 'n_tokens_mistral': 595, 'n_tokens_neox': 561, 'n_words': 150}