Skip to content

Instantly share code, notes, and snippets.

@mustmodify
Created April 11, 2018 19:58
Show Gist options
  • Save mustmodify/518e77b3b8920d99d8484fbc5ed80034 to your computer and use it in GitHub Desktop.
Save mustmodify/518e77b3b8920d99d8484fbc5ed80034 to your computer and use it in GitHub Desktop.
import PropTypes from 'prop-types';
import React from 'react';
import CustomerMatch from '../containers/CustomerMatchContainer';
import {BrowserRouter as Router, Link, Route} from 'react-router-dom'
export default class ServiceParentComponent extends React.Component {
render() {
return (
<Router>
<div>
<Route path="/" exact={true} render={() => (
<div>
<h3>Services App</h3>
<Link to={`/customers/match`}>Customer Match</Link>
</div>
)} />
<Route path="/customers/match" component={CustomerMatch} />
</div>
</Router>
);
}
}
import PropTypes from 'prop-types';
import React from 'react';
import CustomerMatch from '../containers/CustomerMatchContainer';
import {BrowserRouter as Router, Link, Route} from 'react-router-dom'
export default class ServiceParentComponent extends React.Component {
render() {
return (
<Router>
<div>
<Route path="/" exact={true} component={WelcomeScreen} />
<Route path="/customers/match" component={CustomerMatch} />
</div>
</Router>
);
}
}
const WelcomeScreen = (props) => {
<div>
<h3>Services App</h3>
<Link to={`/customers/match`}>Customer Match</Link>
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment