forked from EFUB/efub4-first-react-study
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
26 lines (24 loc) Β· 766 Bytes
/
App.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
import React from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import styled from "styled-components";
import MainPage from "./Component/page/MainPage";
import PostWritePage from "./Component/page/PostWritePage";
import PostViewPage from "./Component/page/PostViewPage";
const MainTitleText = styled.p`
font-size: 24px;
font-weight: bold;
text-align: center;
`;
function App() {
return (
<BrowserRouter>
<MainTitleText>μνμ λ―Έλ λΈλ‘κ·Έ</MainTitleText>
<Routes>
<Route index element={<MainPage />} />
<Route path="post-write" element={<PostWritePage />} />
<Route path="post/:postId" element={<PostViewPage />} />
</Routes>
</BrowserRouter>
);
}
export default App;