App.tsx 805 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
import React from "react";
백승민's avatar
theme1    
백승민 committed
2
import { BrowserRouter, Route, Routes, Link, Outlet} from "react-router-dom";
Yoon, Daeki's avatar
Yoon, Daeki committed
3
import "tailwindcss/tailwind.css";
Lee Soobeom's avatar
Lee Soobeom committed
4
5
6
7
8
import Header from "./Pages/header";
import Body from "./Pages/body";
import Board from "./Pages/board";
import Login from "./Pages/login";
import Signup from "./Pages/signup";
Lee Soobeom's avatar
Lee Soobeom committed
9
import Posting from "./Pages/posting";
Yoon, Daeki's avatar
Yoon, Daeki committed
10
11
12

export const App = () => {
  return (
백승민's avatar
theme1    
백승민 committed
13
14
    <BrowserRouter>
      <Routes>
Kim, MinGyu's avatar
Kim, MinGyu committed
15
16
17
        <Route path="login" element={<Login />} />
        <Route path="signup" element={<Signup />} />
        
백승민's avatar
theme1    
백승민 committed
18
19
        <Route path="/" element={<Header />}>
          <Route index element={<Body />} />
Kim, MinGyu's avatar
Kim, MinGyu committed
20
          <Route path="board" element={<Board />} />
Lee Soobeom's avatar
Lee Soobeom committed
21
          <Route path="posting" element={<Posting/>} />
백승민's avatar
theme1    
백승민 committed
22
23
24
        </Route>
      </Routes>
    </BrowserRouter>
Yoon, Daeki's avatar
Yoon, Daeki committed
25
26
  );
};