Removed logging
This commit is contained in:
@@ -7,8 +7,6 @@ export const AccountProvider = ({ children }: { children: ReactNode }) => {
|
||||
const [user, setUser] = useState<User | null>(null);
|
||||
|
||||
const login = (userData: User) => {
|
||||
console.log("UserData in AccountProvider:", userData);
|
||||
console.log("User in AccountProvider before set:", user);
|
||||
setUser(userData);
|
||||
};
|
||||
|
||||
|
||||
@@ -52,16 +52,13 @@ const LoginDialog: React.FC<LoginDialogProps> = ({ open, onClose, loginData, set
|
||||
setShowErrorLogin(false); // Fehlermeldung zurücksetzen
|
||||
const response = await refetchLogin(); // Anfrage auslösen
|
||||
if (response.status === "success") {
|
||||
const customerData = (await refetchAccount()).data; // Hole die Account-Daten
|
||||
console.log("customerId: ", customerData.customer.id);
|
||||
const customerData = (await refetchAccount()).data;
|
||||
const user = {
|
||||
email: customerData.email,
|
||||
password: customerData.password,
|
||||
customerId: customerData.customer.id, // Setze die customerId aus den Account-Daten
|
||||
};
|
||||
console.log("user: ", user);
|
||||
login(user); // Speichere die Benutzerdaten im AccountProvider
|
||||
console.log("Login erfolgreich:", user);
|
||||
login(user);
|
||||
setShowRegister(false); // Zurück zum Login wechseln
|
||||
onSubmit(); // Dialog schließen
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user