<commit_before>import React, {Component} from 'react';
import {BrowserRouter, Route, Link as RouterLink} from 'react-router-dom';
import {AppBar} from 'react-toolbox/lib/app_bar';
import {Layout, NavDrawer, Panel} from 'react-toolbox/lib/layout';
import routes from '../routes';

const RouteWithSubRoutes = (route) => (
  <Route path={route.path} exact render={(props) => (
    // pass the sub-routes down to keep nesting
    <route.component {...props} routes={route.routes}/>
  )}/>
);

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      navDrawerActive: false
    };
    this.toggleNavDrawerActive = this.toggleNavDrawerActive.bind(this);
  }

  toggleNavDrawerActive() {
    console.log(this);
    this.setState({
      navDrawerActive: !this.state.navDrawerActive
    });
  }

  render() {
    return (
      <BrowserRouter>
        <Layout>
          <NavDrawer
            active={this.state.navDrawerActive}
            onOverlayClick={this.toggleNavDrawerActive}>
            <ul>
              <li><RouterLink to="/">Search</RouterLink></li>
              <li><RouterLink to="/skills">Skills</RouterLink></li>
            </ul>
          </NavDrawer>
          <Panel>
            <AppBar
              leftIcon='menu'
              onLeftIconClick={this.toggleNavDrawerActive}>
            </AppBar>
          </Panel>
          <div style={{paddingTop: '100px'}}>
            {routes.map((route, i) => (
              <RouteWithSubRoutes key={i} {...route}/>
            ))}
          </div>
        </Layout>
      </BrowserRouter>
    );
  }
}

export default App;<commit_msg>Fixed bug so that the content is not misplaced when opening the drawer<commit_after>import React, {Component} from 'react';
import {BrowserRouter, Route, Link as RouterLink} from 'react-router-dom';
import {AppBar} from 'react-toolbox/lib/app_bar';
import {Layout, NavDrawer, Panel} from 'react-toolbox/lib/layout';
import routes from '../routes';

const RouteWithSubRoutes = (route) => (
  <Route path={route.path} exact render={(props) => (
    // pass the sub-routes down to keep nesting
    <route.component {...props} routes={route.routes}/>
  )}/>
);

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      navDrawerActive: false
    };
    this.toggleNavDrawerActive = this.toggleNavDrawerActive.bind(this);
  }

  toggleNavDrawerActive() {
    console.log(this);
    this.setState({
      navDrawerActive: !this.state.navDrawerActive
    });
  }

  render() {
    return (
      <BrowserRouter>
        <Layout>
          <NavDrawer
            active={this.state.navDrawerActive}
            onOverlayClick={this.toggleNavDrawerActive}>
            <ul>
              <li><RouterLink to="/">Search</RouterLink></li>
              <li><RouterLink to="/skills">Skills</RouterLink></li>
            </ul>
          </NavDrawer>
          <Panel>
            <AppBar
              leftIcon='menu'
              onLeftIconClick={this.toggleNavDrawerActive}>
            </AppBar>
            <div>
              {routes.map((route, i) => (
                <RouteWithSubRoutes key={i} {...route}/>
              ))}
          </div>
          </Panel>
        </Layout>
      </BrowserRouter>
    );
  }
}

export default App;
{'fraction_non_alphanumeric': 0.1428139183055976, 'fraction_numerical': 0.000907715582450832, 'mean_word_length': 2.231671554252199, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 59, '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': '1418752', 'n_tokens_mistral': 1000, 'n_tokens_neox': 998, 'n_words': 197}