|
1 | 1 | import React from 'react';
|
2 |
| -import * as Scroll from 'react-scroll'; |
| 2 | +import { HashRouter as Router, Switch, Route } from 'react-router-dom'; |
3 | 3 |
|
4 |
| -import Nav from 'components/Nav'; |
5 |
| -import Page from 'components/Page'; |
6 |
| -import Logo from 'components/Logo'; |
7 |
| -import Title from 'components/Title'; |
8 |
| -import Motto from 'components/Motto'; |
9 |
| -import Footer from 'components/Footer'; |
10 |
| -import Social from 'components/Social'; |
11 |
| -import Markdown from 'components/Markdown'; |
12 |
| -import HeroBanner from 'components/HeroBanner'; |
13 |
| -import { InlineEmoji } from 'components/Emoji'; |
14 |
| -import GetStarted from 'components/GetStarted'; |
15 |
| -import GitHubAnchor from 'components/GitHubAnchor'; |
16 |
| -import FacebookAnchor from 'components/FacebookAnchor'; |
| 4 | +import Root from 'routes/Root'; |
| 5 | +import Quiz from 'routes/Quiz'; |
| 6 | +import isDev from 'utils/is-dev'; |
17 | 7 |
|
18 | 8 | import 'animate.css/animate.min.css';
|
19 | 9 |
|
20 | 10 | function App() {
|
21 | 11 | return (
|
22 | 12 | <div className="App">
|
23 |
| - {/* eslint-disable jsx-a11y/accessible-emoji */} |
24 |
| - <HeroBanner className="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.Element name="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 | + <Route path="/" component={Root} exact /> |
| 16 | + {isDev && <Route path="/quiz" component={Quiz} />} |
| 17 | + </Switch> |
| 18 | + </Router> |
52 | 19 | </div>
|
53 | 20 | );
|
54 | 21 | }
|
|
0 commit comments