Refactor error handling in PaymentSuccess component to redirect users to profile on payment failure, simplifying the user experience by removing the error display box.

This commit is contained in:
sebseb7
2025-07-15 12:29:57 +02:00
parent 5157b7d781
commit c7afad68b0

View File

@@ -153,28 +153,7 @@ class PaymentSuccess extends Component {
}
if (error) {
return (
<Box
sx={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
minHeight: '60vh',
gap: 2
}}
>
<Typography variant="h6" color="error">
Zahlungsüberprüfung fehlgeschlagen
</Typography>
<Typography variant="body2" color="text.secondary">
{error}
</Typography>
<Typography variant="body2" color="text.secondary">
Sie werden zu Ihrem Profil weitergeleitet...
</Typography>
</Box>
);
return <Navigate to="/profile#cart" replace />;
}
if (redirectUrl) {