{"size": 1669, "ext": "js", "max_stars_repo_path": "react-app/src/App.js", "max_stars_repo_name": "gichunts/static-web-app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "react-app/src/App.js", "max_issues_repo_name": "gichunts/static-web-app", "max_issues_repo_issues_event_min_datetime": "2021-02-22T20:35:24.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-05T18:17:29.000Z", "max_forks_repo_path": "react-app/src/App.js", "max_forks_repo_name": "gichunts/static-web-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 33.38, "max_line_length": 79, "alphanum_fraction": 0.5548232475}
import React, { Component, lazy, Suspense } from 'react';
import 'bulma/css/bulma.css';
import './styles.scss';
import { Redirect, Route, Switch } from 'react-router-dom';
import { withRouter } from 'react-router';
import { HeaderBar, NavBar, NotFound } from './components';
import About from './pages/About';
import TriviaGame from './pages/TriviaGame';
import JoinGame from './pages/JoinGame';
import PlayGame from './pages/PlayGame';
import EndOfTheGame from './pages/EndOfTheGame';

const Products = withRouter(
  lazy(() => import(/* webpackChunkName: "products" */ './products/Products')),
);

class App extends Component {
  render() {
    return (
      <div>
        <HeaderBar />
        <div className="section columns">
          <NavBar />
          <main className="column">
            <Suspense fallback={<div>Loading...</div>}>
              <Switch>
                {/* <Redirect from="/" exact to="/products" /> */}
                <Redirect from="/" exact to="/triviagame" />
                <Route path="/products" component={Products} />
                <Route path="/about" component={About} />
                <Route exact path="/triviagame" component={TriviaGame} />
                <Route path="/game/join/:id" component={JoinGame} />
                <Route path="/game/play/:id/:playerId" component={PlayGame} />
                <Route
                  path="/game/finish/:id/:playerId"
                  component={EndOfTheGame}
                />

                <Route exact path="**" component={NotFound} />
              </Switch>
            </Suspense>
          </main>
        </div>
      </div>
    );
  }
}

export default App;
