Skip to content

Commit

Permalink
fix: (#126) 로그아웃시 기존userInfo가 로그인정보에 다시 저장되는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
chsua committed Aug 5, 2023
1 parent bc86135 commit d3b08af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/hooks/context/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
};

useEffect(() => {
if (userInfo) setLoggedInfo(origin => ({ ...origin, userInfo }));
if (userInfo && loggedInfo.isLogged) {
setLoggedInfo(origin => ({ ...origin, userInfo }));
}
}, [userInfo]);

useEffect(() => {
Expand Down

0 comments on commit d3b08af

Please sign in to comment.