Created
April 11, 2018 19:58
-
-
Save mustmodify/518e77b3b8920d99d8484fbc5ed80034 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | |
| ); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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