SurveyRouter.tsx 711 Bytes
Newer Older
1
2
3
4
import React from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import App from "./App";
import { Login, SignUp } from "./auth";
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
5
import { CreateSurveyForm, SurveyForm } from "./commons";
6
7
8
9
10
11
12
13
14
15
16
import { Home } from "./home";

export const SurveyRouter = () => {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<App />}>
          <Route index element={<Home />} />
          <Route path="login" element={<Login />} />
          <Route path="signup" element={<SignUp />} />
          <Route path="create" element={<CreateSurveyForm />} />
Lee SeoYeon's avatar
.    
Lee SeoYeon committed
17
          <Route path="survey" element={<SurveyForm />} />
18
19
20
21
22
        </Route>
      </Routes>
    </BrowserRouter>
  );
};