-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRouter.js
39 lines (37 loc) · 1.31 KB
/
Router.js
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
33
34
35
36
37
38
39
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Sub from './pages/Sub';
import Detail from './pages/Detail';
import Login from './pages/Login';
import Main from './pages/Main';
import MapPage from './pages/MapPage';
import MyPage from './pages/MyPage';
import Payment from './pages/Payment';
import SignUp from './pages/SignUp';
import Header from './components/Layout/Header';
import Footer from './components/Layout/Footer';
import Nav from './components/Layout/Nav';
import PostForm from './pages/PostForm';
import KaKaoLogin from './pages/KaKaoLogin';
const Router = () => {
return (
<BrowserRouter>
<Header />
<Nav />
<Routes>
<Route path="/" element={<Main />} />
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<SignUp />} />
<Route path="/sub" element={<Sub />} />
<Route path="/map" element={<MapPage />} />
<Route path="/detail/:productId" element={<Detail />} />
<Route path="/payment" element={<Payment />} />
<Route path="/mypage" element={<MyPage />} />
<Route path="/postform" element={<PostForm />} />
<Route path="/kakaologin" element={<KaKaoLogin />} />
</Routes>
<Footer />
</BrowserRouter>
);
};
export default Router;