{"size": 571, "ext": "js", "max_stars_repo_path": "frontend/src/routes/intents/index.js", "max_stars_repo_name": "shikdernyc/parrot", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "frontend/src/routes/intents/index.js", "max_issues_repo_name": "shikdernyc/parrot", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "frontend/src/routes/intents/index.js", "max_forks_repo_name": "shikdernyc/parrot", "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": 23.7916666667, "max_line_length": 69, "alphanum_fraction": 0.642732049}
import React from 'react';
import PropTypes from 'prop-types';
import { Route, Switch, Redirect } from 'react-router-dom';
import intentTable from './intentTable.js';
import Create from './create.js';

const Intent = ({ match }) => {
  return (
    <Switch>
      <Route exact path={`${match.url}`} component={intentTable} />
      <Route exact path={`${match.url}/create`} component={Create} />
      <Redirect to="/error/404" />
    </Switch>
  );
};

Intent.propTypes = {
  match: PropTypes.shape({
    url: PropTypes.string.isRequired
  })
};

export default Intent;
