<commit_before>import React from 'react'
import {connect} from 'react-redux'
import {compose, lifecycle} from 'recompose'
import {Route, Switch} from "react-router"
import {ConnectedRouter} from "react-router-redux"


import auth from '../auth'
import {updateAuth} from '../actions/auth'
import PageHeader from './PageHeader'
import HomeView from "./HomeView"
import VideoView from "./VideoView"
import UserContainer from "./UserContainer"
import GroupView from "../views/GroupView"

import '../css/App.css'


const styles = {
  app: {
    minHeight: '100vh',
  },
}

const enhance = compose(
  connect(),
  lifecycle({
    componentWillMount() {
      this.unsubscribeAuth = auth.onAuthStateChanged((user) => (
        this.props.dispatch(updateAuth({user}))
      ))
    },

    componentWillUnmount() {
      this.unsubscribeAuth()
    },
  }),
)

const App = ({history}) => (
  <div style={styles.auth}>
    <PageHeader/>
    <ConnectedRouter history={history}>
      <Switch>
        <Route path='/' component={HomeView}/>
        <Route path='groups/:groupName' component={GroupView}/>
        <Route path='users/:userId' component={UserContainer}/>
        <Route path='videos/:videoId' component={VideoView}/>
        <Route component={HomeView}/>
      </Switch>
    </ConnectedRouter>
  </div>
)
<commit_msg>Remove most routes and get app to build<commit_after>import React from 'react'
import {connect} from 'react-redux'
import {compose, lifecycle} from 'recompose'
import {Route, Switch} from "react-router"
import {ConnectedRouter} from "react-router-redux"


import auth from '../auth'
import {updateAuth} from '../actions/auth'
import PageHeader from './PageHeader'
import HomeView from "./HomeView"
import VideoView from "./VideoView"
import UserContainer from "./UserContainer"
import GroupView from "../views/GroupView"

import '../css/App.css'


const styles = {
  app: {
    minHeight: '100vh',
  },
}

const enhance = compose(
  connect(),
  lifecycle({
    componentWillMount() {
      this.unsubscribeAuth = auth.onAuthStateChanged((user) => (
        this.props.dispatch(updateAuth({user}))
      ))
    },

    componentWillUnmount() {
      this.unsubscribeAuth()
    },
  }),
)

const App = ({history}) => (
  <div style={styles.auth}>
    <ConnectedRouter history={history}>
      <div>
        <PageHeader/>
        <Switch>
          <Route path='/' component={HomeView}/>
          <Route path='groups/:groupName' component={GroupView}/>
          <Route path='users/:userId' component={UserContainer}/>
          <Route path='videos/:videoId' component={VideoView}/>
          <Route component={HomeView}/>
        </Switch>
      </div>
    </ConnectedRouter>
  </div>
)

{'fraction_non_alphanumeric': 0.15415896487985212, 'fraction_numerical': 0.0022181146025878, 'mean_word_length': 3.3157894736842106, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 33, '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': '6921250', 'n_tokens_mistral': 818, 'n_tokens_neox': 809, 'n_words': 197}