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:
@@ -153,28 +153,7 @@ class PaymentSuccess extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return <Navigate to="/profile#cart" replace />;
|
||||||
<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>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (redirectUrl) {
|
if (redirectUrl) {
|
||||||
|
|||||||
Reference in New Issue
Block a user