Skip to content

Commit

Permalink
[fix] 닉네임 관리 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
using2 committed Dec 3, 2024
1 parent c437314 commit dec6ad4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/frontend/src/components/public/UserContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export const UserProvider: React.FC<UserProviderProps> = ({ children }) => {
useEffect(() => {
if (isLoggedIn()) {
fetch();
setNickname(() => {
const savedNickname = localStorage.getItem('nickname');
return savedNickname || '';
});
}
}, [fetchCash, fetchCurrentValue, location, nickname]);

Expand Down

0 comments on commit dec6ad4

Please sign in to comment.