This commit is contained in:
ondal 2025-04-06 13:46:57 +09:00
parent 16734bbeb7
commit 94b8b7b8b5

View File

@ -17,6 +17,9 @@ export const AuthProvider = ({ children }) => {
}, []); }, []);
const login = async (userId, password) => { const login = async (userId, password) => {
removeAuthToken();
setCurrentUser(null);
try { try {
const response = await authApi.login({ userId, password }); const response = await authApi.login({ userId, password });
const { accessToken } = response.data.data; const { accessToken } = response.data.data;