Skip to content

Commit

Permalink
Merge pull request #267 from ssu-student-union/hotfix/kakao-redirect-…
Browse files Browse the repository at this point in the history
…error

hotfix: 카카오 로그인 리다렉 버그 수정
  • Loading branch information
dvp-tae authored Oct 21, 2024
2 parents ff69017 + 74b369a commit ebb005b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ function App() {
/* 총학 홈페이지 접근 시 ssuketch로 리다이렉트 되도록 임시 설정 */
useEffect(() => {
if (window.location.pathname !== '/beta') {
window.location.href = 'https://ssuketch60.cafe24.com/';
if (window.location.pathname === '/auth/callback') {
console.log('카카오');
} else {
window.location.href = 'https://ssuketch60.cafe24.com/';
console.log('카카오 아님');
}
}
}, []);

Expand Down
5 changes: 3 additions & 2 deletions src/containers/common/Header/component/HeaderSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ export function HeaderSheet({ trigger, state: initialState = State.Logout }: Hea
};

const handleLogoutClick = () => {
localStorage.removeItem('accessToken');
localStorage.clear();
setState(State.Logout);
setLoginState(false);
setIsOpen(false);
navigate('/');
// 임시로 메인 라우팅 /beta로 변경
navigate('/beta');
};

return (
Expand Down

0 comments on commit ebb005b

Please sign in to comment.