-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
27 lines (25 loc) · 884 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./components/App";
import registerServiceWorker from "./registerServiceWorker";
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
import Signin from "./components/Signin";
import Signup from "./components/Signup";
import Checkout from "./components/Checkout";
import {Nav} from "./components/Nav"
const Root = () => (
<Router>
<React.Fragment>
<Nav/>
<Switch>
<Route component={App} exact path="/" />
<Route component={Signin} path="/signin" />
<Route component={Signup} path="/signup" />
<Route component={Checkout} path="/checkout" />
</Switch>
</React.Fragment>
</Router>
)
ReactDOM.render(<Root />, document.getElementById("root"));
registerServiceWorker();