Skip to content

Commit

Permalink
etc: local test code remove
Browse files Browse the repository at this point in the history
  • Loading branch information
5nxtnxtnxt committed Dec 11, 2023
1 parent d3b8037 commit a0f2ba2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions front/src/pages/Main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ const Main = () => {
}
};

const saveCookie = () => {
const cookieToken = import.meta.env.VITE_APP_COOKIE_TOKEN;
const cookieName = 'access_token';
const cookieValue = cookieToken;
const today = new Date();
const expire = new Date();
const secure = true;
expire.setDate(today.getDate() + 1);
document.cookie = `${cookieName}=${cookieValue}; expires=${expire.toUTCString()}; secure=${secure}; path=/`;
};
// const saveCookie = () => {
// const cookieToken = import.meta.env.VITE_APP_COOKIE_TOKEN;
// const cookieName = 'access_token';
// const cookieValue = cookieToken;
// const today = new Date();
// const expire = new Date();
// const secure = true;
// expire.setDate(today.getDate() + 1);
// document.cookie = `${cookieName}=${cookieValue}; expires=${expire.toUTCString()}; secure=${secure}; path=/`;
// };

useEffect(() => {
saveCookie();
// saveCookie();

if (!cookie.loggedin) {
navigate('/');
Expand Down

0 comments on commit a0f2ba2

Please sign in to comment.