diff --git a/src/App.js b/src/App.js
index 3f444e7..f3a286a 100644
--- a/src/App.js
+++ b/src/App.js
@@ -10,22 +10,17 @@ import CheckLocalStorage from "./routes/CheckLocalStorage";
const App = () => {
return (
-
-
-
-
- }
- >
- } />
- } />
- } />
- } />
- } />
-
-
+
+
+ }>
+ } />
+ } />
+ } />
+ } />
+ } />
+
+
+
);
};
diff --git a/src/pages/Login.js b/src/pages/Login.js
index dcbaf5a..8442a73 100644
--- a/src/pages/Login.js
+++ b/src/pages/Login.js
@@ -31,7 +31,7 @@ function Login(props) {
}
const { accessToken } = response.data.data;
- setTokenWithExpiry("accessToken", accessToken, 24 * 60 * 60 * 1000);
+ setTokenWithExpiry("accessToken", accessToken, 5 * 60 * 60 * 1000);
Cookies.set("userId", response.data.data.userId, { expires: 1 });
alert("로그인 성공");
window.location.href = "/";
diff --git a/src/routes/CheckLocalStorage.js b/src/routes/CheckLocalStorage.js
index 422fe17..094076e 100644
--- a/src/routes/CheckLocalStorage.js
+++ b/src/routes/CheckLocalStorage.js
@@ -1,12 +1,13 @@
-import { Navigate } from "react-router-dom";
+// import { Navigate } from "react-router-dom";
import { getTokenWithExpiry } from "../utils/auth";
const CheckLocalStorage = ({ children }) => {
const token = getTokenWithExpiry("accessToken");
- // if (!token) {
- // return ;
- // }
+ if (!token) {
+ console.log("expired");
+ // return ;
+ }
return children;
};