<commit_before>import React, { Component } from 'react';
import Feed from './components/feed/Feed';

import { Navbar } from 'react-bootstrap';
import Authenticator from './Authenticator';

class App extends Component {
  constructor(props){
    super(props);

    this.state = {
      isAuthenticated: false
    };

    this.componentDidMount = this.componentDidMount.bind(this);
  }

  componentDidMount(){
    const auth = new Authenticator();

    if (!auth.isAuthenticated()){
      auth.authenticate(() => {
        this.setState({
          isAuthenticated: true
        });
      });
    } else {
      this.setState({
        isAuthenticated: true
      });
    }
  }

  render() {
    if (!this.state.isAuthenticated) return (
      <div className="App">
        <Navbar>
          <Navbar.Header>
            <Navbar.Brand>
              <a href="#">Happy News</a>
            </Navbar.Brand>
          </Navbar.Header>
        </Navbar>

        <div className="container">
          <div>Loading...</div>
        </div>

      </div>
    );

    return (
      <div className="App">
        <Navbar>
          <Navbar.Header>
            <Navbar.Brand>
              <a href="#">Happy News</a>
            </Navbar.Brand>
          </Navbar.Header>
        </Navbar>

        <div className="container">
          <Feed />
        </div>

      </div>
    );
  }
}

export default App;<commit_msg>Cleaned up loader during authentication<commit_after>import React, { Component } from 'react';
import Feed from './components/feed/Feed';

import { Navbar } from 'react-bootstrap';
import Authenticator from './Authenticator';

class App extends Component {
  constructor(props){
    super(props);

    this.state = {
      isAuthenticated: false
    };

    this.componentDidMount = this.componentDidMount.bind(this);
  }

  componentDidMount(){
    const auth = new Authenticator();

    if (!auth.isAuthenticated()){
      auth.authenticate(() => {
        this.setState({
          isAuthenticated: true
        });
      });
    } else {
      this.setState({
        isAuthenticated: true
      });
    }
  }

  render() {
    let feed = <div>Loading...</div>;

    if (this.state.isAuthenticated) {
      feed = <Feed />;
    }

    return (
      <div className="App">
        <Navbar>
          <Navbar.Header>
            <Navbar.Brand>
              <a href="#">Happy News</a>
            </Navbar.Brand>
          </Navbar.Header>
        </Navbar>

        <div className="container">
          { feed }
        </div>

      </div>
    );
  }
}

export default App;
{'fraction_non_alphanumeric': 0.14379590258987243, 'fraction_numerical': 0.0, 'mean_word_length': 1.843956043956044, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 47, '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': '6414425', 'n_tokens_mistral': 796, 'n_tokens_neox': 765, 'n_words': 157}