Skip to content

Commit

Permalink
feat: 토큰 지우는 경로 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Arooming committed Jan 19, 2024
1 parent f232cd8 commit 9805d30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useQueryErrorResetBoundary } from 'react-query';
import { BrowserRouter, Route, Routes } from 'react-router-dom';

import BoundaryErrorPage from './components/common/BoundaryErrorPage';
import ClearToken from './components/common/ClearToken/ClearToken';
import ErrorPage from './components/common/ErrorPage';
import LoadingPage from './components/common/LoadingPage';
import CreateBook from './CreateBook/page';
Expand Down Expand Up @@ -47,6 +48,7 @@ function Router() {
<Route path="/loading" element={<LoginCallback />} />
<Route path="/error" element={<ErrorPage />} />
<Route path="/loading-page" element={<LoadingPage />} />
<Route path="/clear" element={<ClearToken />} />
<Route path="/*" element={<ErrorPage />} />
</Routes>
</Suspense>
Expand Down
7 changes: 7 additions & 0 deletions src/components/common/ClearToken/ClearToken.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function ClearToken() {
window.localStorage.clear();

return <div>clear token</div>;
}

export default ClearToken;

0 comments on commit 9805d30

Please sign in to comment.