App.js 892 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
import React from 'react';
Jiwon Yoon's avatar
ha..    
Jiwon Yoon committed
2
// import './App.css';
Jiwon Yoon's avatar
Jiwon Yoon committed
3
4
5
import Home from './Home'
import Quiz from './Quiz'
import End from './End'
baesangjune's avatar
baesangjune committed
6
import Admin from './Admin'
Jiwon Yoon's avatar
Jiwon Yoon committed
7

baesangjune's avatar
baesangjune committed
8
import { BrowserRouter as Router, Link, Switch, Route, Redirect } from 'react-router-dom';
Yoon, Daeki's avatar
Yoon, Daeki committed
9
10
11

function App() {
  return (
Jiwon Yoon's avatar
Jiwon Yoon committed
12
    <Router>
Jiwon Yoon's avatar
ha..    
Jiwon Yoon committed
13
14
15
      <div className="container-fluid vh-100 bg-light">
        <header className="border-bottom">
          <Link to="/">
Jiwon Yoon's avatar
ㅠㅠ    
Jiwon Yoon committed
16
            <button className="ml-3 btn btn-light btn-lg font-weight-bold text-info">Home</button>
Jiwon Yoon's avatar
ha..    
Jiwon Yoon committed
17
18
          </Link>
        </header>
Jiwon Yoon's avatar
Jiwon Yoon committed
19
        <Switch>
baesangjune's avatar
baesangjune committed
20
21
22
23
24
25
26
27
28
          <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" />
Jiwon Yoon's avatar
Jiwon Yoon committed
29
30
        </Switch>
      </div>
Jiwon Yoon's avatar
ha..    
Jiwon Yoon committed
31
32


Jiwon Yoon's avatar
Jiwon Yoon committed
33
34
    </Router>
  )
Yoon, Daeki's avatar
Yoon, Daeki committed
35
36
}

Jiwon Yoon's avatar
quiz    
Jiwon Yoon committed
37

Jiwon Yoon's avatar
Jiwon Yoon committed
38
export default App;