diff --git a/src/App.jsx b/src/App.jsx index 9588690..1927bf6 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,56 +1,81 @@ -import React from 'react'; -import { BrowserRouter as Router, Routes, Route,Navigate } from 'react-router-dom'; -import { useState } from 'react'; -import Navbar from './components/Navbar'; -import Home from './pages/Home'; -import About from './pages/About'; -import NotFound from './pages/NotFound'; -import WishlistPage from './pages/WishlistPage'; -import Magazine from './pages/Magazine'; -import SignupForm from './pages/Signup'; -import CalendarPage from './pages/CalendarPage'; -import LoginPage from './pages/login'; -import RegisterPage from './pages/register'; -import Register_success from './pages/Register_success'; -import SurveyPage from './pages/Survey'; +import React from "react"; +import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; +import Navbar from "./components/Navbar"; +import Home from "./pages/Home"; +import About from "./pages/About"; +import NotFound from "./pages/NotFound"; +import WishlistPage from "./pages/WishlistPage"; +import Magazine from "./pages/Magazine"; +import CalendarPage from "./pages/CalendarPage"; +import LoginPage from "./pages/login"; +import RegisterPage from "./pages/register"; +import Register_success from "./pages/Register_success"; +import SurveyPage from "./pages/SurveyPage"; +import { AuthProvider } from "./functions/AuthContext"; +import AuthRoute from "./pages/AuthRoute"; +import Empty from "./pages/empty"; function App() { - - const [isLoggedIn, setIsLoggedIn] = useState(false); - - // 로그아웃 처리 - const handleLogout = () => { - localStorage.removeItem('accessToken'); - localStorage.removeItem('refreshToken'); - setIsLoggedIn(false); - }; - - return ( -