Commit 5d3b9c6f authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

Profile, RequireAuth 컴포넌트 라우트에 추가

parent 58fc8be2
...@@ -2,9 +2,11 @@ import React from "react"; ...@@ -2,9 +2,11 @@ import React from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom"; import { BrowserRouter, Route, Routes } from "react-router-dom";
import App from "./App"; import App from "./App";
import { Login, SignUp } from "./auth"; import { Login, SignUp } from "./auth";
import { RequireAuth } from "./auth/RequireAuth";
import { SurveyForm } from "./commons"; import { SurveyForm } from "./commons";
import { CreateSurveyForm } from "./CreateSurveyForm"; import { CreateSurveyForm } from "./CreateSurveyForm";
import { Home } from "./home"; import { Home } from "./home";
import { Profile } from "./profile";
export const SurveyRouter = () => { export const SurveyRouter = () => {
return ( return (
...@@ -16,6 +18,14 @@ export const SurveyRouter = () => { ...@@ -16,6 +18,14 @@ export const SurveyRouter = () => {
<Route path="signup" element={<SignUp />} /> <Route path="signup" element={<SignUp />} />
<Route path="create" element={<CreateSurveyForm />} /> <Route path="create" element={<CreateSurveyForm />} />
<Route path="survey" element={<SurveyForm />} /> <Route path="survey" element={<SurveyForm />} />
<Route
path="profile"
element={
<RequireAuth>
<Profile />
</RequireAuth>
}
/>
</Route> </Route>
</Routes> </Routes>
</BrowserRouter> </BrowserRouter>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment