Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… feat/#113
  • Loading branch information
100Gyeon committed Jan 19, 2022
2 parents 76cc54f + 853b343 commit 04ef3b0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/application/hooks/useLoginUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ export function useLoginUser() {
const saveLoginUser = (loginUser: LoginUser) => {
setLoginUser(loginUser);
setIsAuthenticated(true);
console.log(loginUser);
localStorage.setItem('token', loginUser.accessToken);
};

const initLoginUser = async () => {
try {
const token = localStorage.getItem('token');
console.log(token);
if (!token) throw '토큰이 없습니다';
const user = await api.loginUserService.getUserInfo(token);
saveLoginUser(user);
Expand Down

0 comments on commit 04ef3b0

Please sign in to comment.