Add new frontend - fix 5
This commit is contained in:
@@ -57,7 +57,8 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
|
||||
const register = useCallback(async (data: any) => {
|
||||
const profile = await authService.register(data);
|
||||
setUser(profile);
|
||||
}, []);
|
||||
await login(data.email, data.password); // Reuse the login function
|
||||
}, [login]);
|
||||
|
||||
const logout = useCallback(async () => {
|
||||
await authService.logout();
|
||||
|
||||
Reference in New Issue
Block a user