11import React from 'react' ;
2- import logo from './logo.svg ' ;
2+ import { BrowserRouter as Router , Route , Switch , Link } from 'react-router-dom ' ;
33import './App.css' ;
4+ import AppContext from './context/AppContext' ;
5+
6+ //get routes
7+ import contactRoutes from './screens/contact/routes' ;
8+ import bobRoutes from './screens/bob_ross/routes' ;
9+ import tausifRoute from './screens/Tausif/routes' ;
10+ import HappyPath from './screens/happypath/routes' ;
11+ import evelynRoutes from './screens/Evelyn/routes' ;
12+ import HelloButtonRoutes from "./screens/fred/routes/HelloButtonRoute" ;
13+ import Alice from "./screens/alice/routes" ;
14+ // import prateek from "./screens/Prateek/routes/index";
15+ import useDogs from './screens/contact/hooks/useDogs' ;
16+
417
518function App ( ) {
19+ const dogs = useDogs ( [ 'roofus' , 'spotter' , 'boogey' , 'ben' ] ) ;
620 return (
7- < div className = "App" >
8- < header className = "App-header" >
9- < img src = { logo } className = "App-logo" alt = "logo" />
10- < p >
11- Edit < code > src/App.js</ code > and save to reload.
12- </ p >
13- < a
14- className = "App-link"
15- href = "https://reactjs.org"
16- target = "_blank"
17- rel = "noopener noreferrer"
18- >
19- Learn React
20- </ a >
21- </ header >
22- </ div >
21+ < AppContext . Provider value = { { dogs : dogs , data : 'sdfsf' } } >
22+ < Router >
23+ < h1 > This is our app</ h1 >
24+ < div className = "menu" >
25+ < Link to = "/contact" > Contact</ Link >
26+ < Link to = "/tausif" > Tausif</ Link >
27+ < Link to = "/fred" > Fred</ Link >
28+ < Link to = "/bob" > Bob the Ross</ Link >
29+ < Link to = "/alice" > Alice</ Link >
30+ < Link to = "/happypath" > Happy Path</ Link >
31+ { /* <Link to="/prateek">Prateek</Link> */ }
32+ < Link to = "/mounika" > Mounika</ Link >
33+ < Link to = "/evelyn" > Evelyn</ Link >
34+ </ div >
35+ < Switch >
36+ { [
37+ ...contactRoutes ,
38+ ...bobRoutes ,
39+ ...tausifRoute ,
40+ ...evelynRoutes ,
41+ ...HelloButtonRoutes ,
42+ ...HappyPath ,
43+ ...Alice
44+ ] }
45+ </ Switch >
46+ </ Router >
47+ </ AppContext . Provider >
2348 ) ;
2449}
2550
26- export default App ;
51+ export default App ;
0 commit comments