Removed logging

This commit is contained in:
FlorianSpeicher
2025-06-15 14:43:22 +02:00
parent 2a69bdf3a0
commit 1985e5421c
2 changed files with 2 additions and 7 deletions

View File

@@ -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);
};

View File

@@ -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 {