{"size": 1801, "ext": "js", "max_stars_repo_path": "src/App.js", "max_stars_repo_name": "mysticeti/react-sandbox", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/App.js", "max_issues_repo_name": "mysticeti/react-sandbox", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/App.js", "max_forks_repo_name": "mysticeti/react-sandbox", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.3137254902, "max_line_length": 76, "alphanum_fraction": 0.6474181011}
import React, { Fragment, useEffect } from "react";
import CssBaseline from "@material-ui/core/CssBaseline";

import NavDrawer from "./components/common/nav-drawer";
import Footer from "./components/common/footer.jsx";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
import { preloadAuth, useFirebaseApp } from "reactfire";

import HomePage from "./components/home-page.jsx";
import FormPage from "./components/form/form-page.jsx";
import GoogleMapsPage from "./components/google-map/google-map-page.jsx";
import AuthPage from "./components/auth/auth-page.jsx";
import MapboxPage from "./components/mapbox/mapbox-page.jsx";
import WebcamPage from "./components/webcam/webcam-page.jsx";
import GeolocationPage from "./components/geolocation/geolocation-page.jsx";
import LargeListsPage from "./components/large-lists/large-lists-page.jsx";

function App() {
  const firebaseApp = useFirebaseApp();

  useEffect(async () => {
    await preloadAuth({ firebaseApp });
  }, []);

  return (
    <Router>
      <CssBaseline />
      <NavDrawer
        pageContent={
          <Fragment>
            <Switch>
              <Route exact path="/" component={HomePage} />
              <Route path="/google-map-page" component={GoogleMapsPage} />
              <Route path="/form-page" component={FormPage} />
              <Route path="/auth" component={AuthPage} />
              <Route path="/mapbox-page" component={MapboxPage} />
              <Route path="/webcam-page" component={WebcamPage} />
              <Route path="/geolocation-page" component={GeolocationPage} />
              <Route path="/large-lists-page" component={LargeListsPage} />
            </Switch>

            <Footer />
          </Fragment>
        }
      />
    </Router>
  );
}

export default App;
