App.tsx 907 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";
Kim, MinGyu's avatar
Kim, MinGyu committed
4
import { Login, Signup, Profile } from "./auth";
5
6
7
import { Board } from "./board";
import { Header, Body } from "./home";
import Posting from "./post/posting";
Kim, MinGyu's avatar
Kim, MinGyu committed
8
import Layout from "./commons/layout";
Yoon, Daeki's avatar
Yoon, Daeki committed
9
10
11

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