{"size": 894, "ext": "js", "max_stars_repo_path": "imports/core/startup/client/routes.js", "max_stars_repo_name": "npaton/RME_test", "max_stars_repo_stars_event_min_datetime": "2018-06-20T16:05:56.000Z", "max_stars_repo_stars_event_max_datetime": "2018-06-20T16:05:56.000Z", "max_issues_repo_path": "imports/core/startup/client/routes.js", "max_issues_repo_name": "npaton/RME_test", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "imports/core/startup/client/routes.js", "max_forks_repo_name": "npaton/RME_test", "max_forks_repo_forks_event_min_datetime": "2018-06-01T07:47:56.000Z", "max_forks_repo_forks_event_max_datetime": "2018-06-01T07:47:56.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 37.25, "max_line_length": 89, "alphanum_fraction": 0.6756152125}
import { BrowserRouter, Switch } from "react-router-dom";
import React from "react";

import Admin from "../../ui/components/Admin";
import AuthorizedRoute from "../../ui/containers/AuthorizedRoute";
import IdentifiedRoute from "../../ui/containers/IdentifiedRoute";
import Login from "../../ui/components/Login";
import PublicContainer from "../../ui/containers/PublicContainer";

export const renderRoutes = () => (
  <BrowserRouter>
    <div className="app">
      <Switch>
        {/* IdentifiedRoutes need to know which player the user is to play a game */}
        <IdentifiedRoute path="/" exact component={PublicContainer} />

        {/* AuthorizedRoutes need to know if the user is logged in for admin business */}
        <AuthorizedRoute path="/admin" component={Admin} />
        <AuthorizedRoute path="/login" component={Login} />
      </Switch>
    </div>
  </BrowserRouter>
);
