compare.js 890 Bytes
Newer Older
JeongYeonwoo's avatar
JeongYeonwoo committed
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
28
29
30
31
32
import React from 'react';
// import './App.css';
import Home from './Home'
import Quiz from './Quiz'
import End from './End'
import Admin from './Admin'

import { BrowserRouter as Router, Link, Switch, Route, Redirect } from 'react-router-dom';

function App() {
  return (
    <Router>
      <div className="container-fluid vh-100 bg-light">
        <header className="border-bottom">
          <Link to="/">
            <button className="ml-3 btn btn-light btn-lg font-weight-bold text-dark">Home</button>
          </Link>
        </header>
        <Switch>
          <Route exact path="/" component={Home} />

          <Route path="/quiz" component={Quiz} />

          <Route path="/end" component={End} />

          <Route path="/admin" component={Admin} />

          <Redirect path="/admin" to="/admin" />
        </Switch>
      </div>
    </Router>
  )
JeongYeonwoo's avatar
quiz    
JeongYeonwoo committed
33
34
}

JeongYeonwoo's avatar
JeongYeonwoo committed
35
36

export default App;