Skip to content

Commit

Permalink
[fix] boostcampwm-2022#85 userState에 id 추가(할 예정)
Browse files Browse the repository at this point in the history
- 충돌 방지 차원에서 미리 id 추가
  • Loading branch information
ktmihs committed Dec 4, 2022
1 parent 3fd83d7 commit 99ca6e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/guard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ export const pageGuard = () => {
const { data } = await axios.get('/api/user/auth');

setUser({
nickname: data?.nickname?.trim(),
hair: data?.characterName?.trim(),
id: data.id.toString().trim(),
nickname: data.nickname.trim(),
hair: data.characterName.trim(),
});
} catch (e) {
navigate('/');
Expand Down

0 comments on commit 99ca6e0

Please sign in to comment.