Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit 55d1ad4

Browse files
Modify success and failure page (#187)
1 parent f74bf65 commit 55d1ad4

File tree

2 files changed

+46
-40
lines changed

2 files changed

+46
-40
lines changed
Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
import { makeStyles, Typography } from '@material-ui/core';
1+
import { makeStyles, Typography, Link } from '@material-ui/core';
22
import React from 'react';
3-
import { Redirect } from 'react-router';
3+
import CustomButton from '../../../components/Button/ButtonComponent'
44

5-
const useStyles = makeStyles(() => ({
6-
root: {
7-
marginTop: '49vh'
5+
const useStyles = makeStyles((theme) => ({
6+
root: {
7+
marginTop: '35vh',
8+
textAlign: 'center',
9+
color: theme.palette.text
10+
},
11+
button: {
12+
marginTop: '40px'
813
}
914
}));
1015

1116
export default function Success() {
1217
const classes = useStyles();
1318

14-
const [wait, removeWait] = React.useState(true);
15-
16-
setTimeout(
17-
function () {
18-
removeWait(false);
19-
},
20-
5000)
21-
22-
if (wait) {
19+
if (true) {
2320
return (
2421
<div className={classes.root}>
25-
<Typography align="center" style={{color: 'red'}}>Your last payment to codeforcause was Failed. Redirecting to home page...</Typography>
22+
<Typography align="center">Your last payment to codeforcause was Failed. You can retry the payment on the course website.</Typography>
23+
<Typography align="center">Connect with us at {` `}
24+
<Link
25+
href="mailto:[email protected]"
26+
27+
{` `}or{` `}
28+
<Link
29+
href="tel:+919810468685"
30+
>+91 98104 68685</Link>
31+
32+
{` `} in case of any help.</Typography>
33+
<CustomButton className={classes.button} title="Go Back To Homepage" href="/" />
2634
</div>
2735
);
2836
}
29-
30-
return (
31-
<Redirect to="/" />
32-
)
3337
}
Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
import { makeStyles, Typography } from '@material-ui/core';
1+
import { makeStyles, Typography, Link } from '@material-ui/core';
22
import React from 'react';
3-
import { Redirect } from 'react-router';
3+
import CustomButton from '../../../components/Button/ButtonComponent'
44

5-
const useStyles = makeStyles(() => ({
6-
root: {
7-
marginTop: '49vh'
5+
const useStyles = makeStyles((theme) => ({
6+
root: {
7+
marginTop: '35vh',
8+
textAlign: 'center',
9+
color: theme.palette.text
10+
},
11+
button: {
12+
marginTop: '40px'
813
}
914
}));
1015

1116
export default function Success() {
1217
const classes = useStyles();
1318

14-
const [wait, removeWait] = React.useState(true);
15-
16-
setTimeout(
17-
function () {
18-
removeWait(false);
19-
},
20-
7000)
21-
22-
if (wait) {
19+
if (true) {
2320
return (
2421
<div className={classes.root}>
25-
<Typography align="center">Your last payment to codeforcause was successful. We will connect you within 24 hours for further details.</Typography>
26-
<Typography align="center">Connect with us is case of any doubt.</Typography>
27-
<Typography align="center">Redirecting to home page...</Typography>
22+
<Typography align="center">Your last payment to codeforcause was successful. We will connect with you within 24 hours with more details.</Typography>
23+
<Typography align="center">Connect with us at {` `}
24+
<Link
25+
href="mailto:[email protected]"
26+
27+
{` `}or{` `}
28+
<Link
29+
href="tel:+919810468685"
30+
>+91 98104 68685</Link>
31+
32+
{` `} in case of any doubt.</Typography>
33+
<CustomButton className={classes.button} title="Go Back To Homepage" href="/" />
2834
</div>
2935
);
3036
}
31-
32-
return (
33-
<Redirect to="/" />
34-
)
3537
}

0 commit comments

Comments
 (0)