|
@@ -0,0 +1,76 @@
|
|
1
|
+import React, { useState } from 'react';
|
|
2
|
+import { Box, TextField, Typography, Button } from '@mui/material';
|
|
3
|
+
|
|
4
|
+const DeliveryInfo = () => {
|
|
5
|
+ const [trackingNumber, setTrackingNumber] = useState('');
|
|
6
|
+
|
|
7
|
+ return (
|
|
8
|
+ <Box sx={{
|
|
9
|
+ textAlign: "center",
|
|
10
|
+ mt: 15,
|
|
11
|
+ px: {
|
|
12
|
+ xs: 2,
|
|
13
|
+ md: 5,
|
|
14
|
+ lg: 5
|
|
15
|
+ },
|
|
16
|
+ mb: {
|
|
17
|
+ xs: 0,
|
|
18
|
+ md: 5,
|
|
19
|
+ lg: 10
|
|
20
|
+ }
|
|
21
|
+ }}>
|
|
22
|
+ <Typography variant='h4' sx={{ textAlign: "center", fontWeight: "bolder", mb: 3 }}>
|
|
23
|
+ DELIVERY INFORMATION
|
|
24
|
+ </Typography>
|
|
25
|
+ <Box sx={{ border: "1px solid black", maxWidth: "600px", margin: "auto auto" }}>
|
|
26
|
+ <Box sx={{ borderBottom: "1px solid black" }}>
|
|
27
|
+ <Typography variant='h5' sx={{ textAlign: "center", fontWeight: "bolder", py: 2, px: 1 }}>
|
|
28
|
+ ORDER TRACKING NUMBER
|
|
29
|
+ </Typography>
|
|
30
|
+ </Box>
|
|
31
|
+ <Box sx={{ px: { xs: 1, sm: 2, md: 4 }, py: 3 }}>
|
|
32
|
+ <Typography variant='body2' sx={{ textAlign: "center", py: 2, px: 1, margin: "auto auto" }}>
|
|
33
|
+ Thank you for your purchase! Your order is on its way. You can track the status of your shipment using the tracking number provided below.
|
|
34
|
+ </Typography>
|
|
35
|
+ <TextField
|
|
36
|
+ variant="outlined"
|
|
37
|
+ placeholder="Order Tracking Number"
|
|
38
|
+ type="text"
|
|
39
|
+ value={trackingNumber}
|
|
40
|
+ onChange={(e) => setTrackingNumber(e.target.value)}
|
|
41
|
+ sx={{
|
|
42
|
+ py: 2,
|
|
43
|
+ width: "100%",
|
|
44
|
+ }}
|
|
45
|
+ />
|
|
46
|
+ </Box>
|
|
47
|
+ </Box>
|
|
48
|
+ <Button
|
|
49
|
+ onClick={() => {
|
|
50
|
+ if (trackingNumber.trim()) {
|
|
51
|
+ window.open(`https://app.easyparcel.com/my/en/track/details/?courier=JnT-Express&awb=${trackingNumber}`, '_blank')
|
|
52
|
+ } else {
|
|
53
|
+ alert("Please enter a tracking number.");
|
|
54
|
+ }
|
|
55
|
+ }}
|
|
56
|
+ variant="contained"
|
|
57
|
+ sx={{
|
|
58
|
+ backgroundColor: "#000",
|
|
59
|
+ color: "white",
|
|
60
|
+ margin: "0 auto",
|
|
61
|
+ mt: 6,
|
|
62
|
+ px: 7,
|
|
63
|
+ py: 2,
|
|
64
|
+ textTransform: "none",
|
|
65
|
+ "&:hover": {
|
|
66
|
+ backgroundColor: (theme) => theme.palette.grey[900],
|
|
67
|
+ },
|
|
68
|
+ }}
|
|
69
|
+ >
|
|
70
|
+ SUBMIT
|
|
71
|
+ </Button>
|
|
72
|
+ </Box>
|
|
73
|
+ );
|
|
74
|
+};
|
|
75
|
+
|
|
76
|
+export default DeliveryInfo;
|