Created
January 12, 2021 10:23
-
-
Save velotiotech/9e9d8752a60a100f7fd0050634ec9543 to your computer and use it in GitHub Desktop.
This file contains 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 { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; | |
import RepoList from './RepoList'; | |
import RepoDetails from './RepoDetails'; | |
import './App.css'; | |
function App() { | |
return ( | |
<Router> | |
<div className="App"> | |
<Switch> | |
<Route path="/repo/:owner/:repo" component={RepoDetails} /> | |
<Route path="/" component={RepoList} /> | |
</Switch> | |
</div> | |
</Router> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment