|
1 | | -import logo from './logo.svg'; |
2 | | -import './App.css'; |
| 1 | +import {BrowserRouter, Route, Routes} from "react-router-dom"; |
| 2 | + |
| 3 | +import Header from "./components/header/Header"; |
| 4 | +import Footer from "./components/footer/Footer"; |
| 5 | +import Main from "./components/mainpage/Main"; |
| 6 | +import Login from "./components/login/Login"; |
| 7 | +import SignUp from "./components/signup/SignUp"; |
| 8 | +import Codecast from "./components/codecast/Codecast"; |
| 9 | +import Community from "./components/community/Community"; |
| 10 | +import IDE from "./components/ide/IDE"; |
| 11 | +import StartCodecast from "./components/codecast/StartCodecast"; |
| 12 | +import Mypage from "./components/mypage/Mypage"; |
| 13 | +import Settings from "./components/mypage/Settings"; |
| 14 | +import Shared from "./components/mypage/Shared"; |
| 15 | +import MyProject from "./components/mypage/MyProject"; |
| 16 | +import MyCommunity from "./components/mypage/MyCommunity"; |
3 | 17 |
|
4 | 18 | function App() { |
5 | 19 | return ( |
6 | | - <div className="App"> |
7 | | - <header className="App-header"> |
8 | | - <img src={logo} className="App-logo" alt="logo" /> |
9 | | - <p> |
10 | | - Edit <code>src/App.js</code> and save to reload. |
11 | | - </p> |
12 | | - <a |
13 | | - className="App-link" |
14 | | - href="https://reactjs.org" |
15 | | - target="_blank" |
16 | | - rel="noopener noreferrer" |
17 | | - > |
18 | | - Learn React |
19 | | - </a> |
20 | | - </header> |
21 | | - </div> |
| 20 | + <BrowserRouter> |
| 21 | + <Header /> |
| 22 | + <Routes> |
| 23 | + <Route path="/" element={<Main />} /> |
| 24 | + <Route path="/login" element={<Login />} /> |
| 25 | + <Route path="/signup" element={<SignUp />} /> |
| 26 | + <Route path="/ide" element={<IDE />} /> |
| 27 | + <Route path="/community" element={<Community />} /> |
| 28 | + <Route path="/broadcast" element={<Codecast />} /> |
| 29 | + <Route path="/startbroadcast" element={<StartCodecast />} /> |
| 30 | + <Route path="/mypage"> |
| 31 | + <Route index element={<Mypage />} /> |
| 32 | + <Route path="project" element={<MyProject />} /> |
| 33 | + <Route path="community" element={<MyCommunity />} /> |
| 34 | + <Route path="setting" element={<Settings />} /> |
| 35 | + <Route path="shared" element={<Shared />} /> |
| 36 | + </Route> |
| 37 | + </Routes> |
| 38 | + <Footer /> |
| 39 | + </BrowserRouter> |
22 | 40 | ); |
23 | 41 | } |
24 | 42 |
|
|
0 commit comments