|
1 | 1 | importReactfrom'react'; |
2 | | -import*asScrollfrom'react-scroll'; |
| 2 | +import{HashRouterasRouter,Switch,Route}from'react-router-dom'; |
3 | 3 |
|
4 | | -importNavfrom'components/Nav'; |
5 | | -importPagefrom'components/Page'; |
6 | | -importLogofrom'components/Logo'; |
7 | | -importTitlefrom'components/Title'; |
8 | | -importMottofrom'components/Motto'; |
9 | | -importFooterfrom'components/Footer'; |
10 | | -importSocialfrom'components/Social'; |
11 | | -importMarkdownfrom'components/Markdown'; |
12 | | -importHeroBannerfrom'components/HeroBanner'; |
13 | | -import{InlineEmoji}from'components/Emoji'; |
14 | | -importGetStartedfrom'components/GetStarted'; |
15 | | -importGitHubAnchorfrom'components/GitHubAnchor'; |
16 | | -importFacebookAnchorfrom'components/FacebookAnchor'; |
| 4 | +importRootfrom'routes/Root'; |
| 5 | +importQuizfrom'routes/Quiz'; |
| 6 | +importisDevfrom'utils/is-dev'; |
17 | 7 |
|
18 | 8 | import'animate.css/animate.min.css'; |
19 | 9 |
|
20 | 10 | functionApp(){ |
21 | 11 | return( |
22 | 12 | <divclassName="App"> |
23 | | -{/* eslint-disable jsx-a11y/accessible-emoji */} |
24 | | -<HeroBannerclassName="animated fadeIn"> |
25 | | -<Nav> |
26 | | -<Title/> |
27 | | -<Social> |
28 | | -<FacebookAnchor/> |
29 | | -<GitHubAnchor/> |
30 | | -</Social> |
31 | | -</Nav> |
32 | | -<Logo/> |
33 | | -<Motto/> |
34 | | -<GetStarted/> |
35 | | -</HeroBanner> |
36 | | -<Scroll.Elementname="Page-Markdown"> |
37 | | -<Page> |
38 | | -<h1>Getting started</h1> |
39 | | -<p> |
40 | | - JS Snippets is all about staying updated with the latest JavaScript |
41 | | - APIs. The following snippets consist of new and old APIs, so you get |
42 | | - to see how things changed over time. JavaScript's undisputed nature |
43 | | - makes it one of the fastest evolving languages. So go ahead, check |
44 | | - out some of those snippets and who knows, you might be surprised |
45 | | - with a feature or API you never knew existed! |
46 | | -<InlineEmoji>👌</InlineEmoji> |
47 | | -</p> |
48 | | -<Markdown/> |
49 | | -</Page> |
50 | | -</Scroll.Element> |
51 | | -<Footer/> |
| 13 | +<Router> |
| 14 | +<Switch> |
| 15 | +<Routepath="/"component={Root}exact/> |
| 16 | +{isDev&&<Routepath="/quiz"component={Quiz}/>} |
| 17 | +</Switch> |
| 18 | +</Router> |
52 | 19 | </div> |
53 | 20 | ); |
54 | 21 | } |
|