{"size": 468, "ext": "js", "max_stars_repo_path": "shared/routes.js", "max_stars_repo_name": "quoeradem/codex", "max_stars_repo_stars_event_min_datetime": "2017-06-30T18:05:10.000Z", "max_stars_repo_stars_event_max_datetime": "2017-06-30T18:05:10.000Z", "max_issues_repo_path": "shared/routes.js", "max_issues_repo_name": "quoeradem/codex", "max_issues_repo_issues_event_min_datetime": "2017-05-21T19:48:25.000Z", "max_issues_repo_issues_event_max_datetime": "2017-07-30T19:13:32.000Z", "max_forks_repo_path": "shared/routes.js", "max_forks_repo_name": "quoeradem/codex", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 9, "max_forks_count": null, "avg_line_length": 17.3333333333, "max_line_length": 66, "alphanum_fraction": 0.5790598291}
import React from 'react';
import {Route, Switch} from 'react-router-dom';

import Home from './components/Home';
import Page from './components/Page';

export const routes = [
  {
    name: 'home',
    exact: true,
    path: '/',
    component: Home
  },
  {
    name: 'page',
    path: '/:page',
    component: Page
  }
]

export function createRoutes() {
  return (
    <Switch>
      {routes.map(route => <Route {...route} key={route.name} />)}
    </Switch>
  )
}