const { user, token } = JSON.parse(localStorage.getItem('auth'));
return Promise.resolve({ user.id, user.username });
Uncaught SyntaxError: Unexpected token '.'
на user.id. - return Promise.resolve({ user.id, user.username });
+ return Promise.resolve({ id: user.id, name: user.username });
- return Promise.resolve({ user.id, user.username });
+ return Promise.resolve({ "user.id": user.id, "user.username": user.username });