App.tsx 1015 Bytes
Newer Older
Yoon, Daeki's avatar
Yoon, Daeki committed
1
import React from "react";
2
import { BrowserRouter, Route, Routes, Link, Outlet } from "react-router-dom";
Yoon, Daeki's avatar
Yoon, Daeki committed
3
import "tailwindcss/tailwind.css";
4
5
6
7
import { Login, Signup } from "./auth";
import { Board } from "./board";
import { Header, Body } from "./home";
import Posting from "./post/posting";
8
9
import { AuthProvider } from "./auth/auth.context";
import Layout from "./commons/layout";
Yoon, Daeki's avatar
Yoon, Daeki committed
10
11
12

export const App = () => {
  return (
백승민's avatar
theme1    
백승민 committed
13
14
    <BrowserRouter>
      <Routes>
15
16
17
18
19
20
21
22
23
        {/* <Route element={<Layout children={} />}> */}
        <Route
          path="login"
          element={
            <AuthProvider>
              <Login />
            </AuthProvider>
          }
        />
Kim, MinGyu's avatar
Kim, MinGyu committed
24
        <Route path="signup" element={<Signup />} />
25

백승민's avatar
theme1    
백승민 committed
26
27
        <Route path="/" element={<Header />}>
          <Route index element={<Body />} />
Kim, MinGyu's avatar
Kim, MinGyu committed
28
          <Route path="board" element={<Board />} />
29
          <Route path="posting" element={<Posting />} />
백승민's avatar
theme1    
백승민 committed
30
        </Route>
31
        {/* </Route> */}
백승민's avatar
theme1    
백승민 committed
32
33
      </Routes>
    </BrowserRouter>
Yoon, Daeki's avatar
Yoon, Daeki committed
34
35
  );
};