ソースを参照

done product page

cart-api-guide
azri 1週間前
コミット
d408602303

+ 107
- 0
src/components/ImageView/ImageView.jsx ファイルの表示

@@ -0,0 +1,107 @@
1
+import React, { useState } from "react";
2
+import {
3
+  Box,
4
+  Typography,
5
+  IconButton,
6
+  Dialog,
7
+  DialogContent,
8
+} from "@mui/material";
9
+import Grid from '@mui/material/Grid2';
10
+
11
+const ImageView = () => {
12
+  const [previewImage, setPreviewImage] = useState("https://business.aducktive.com/storage/product/23/ceGt6VWGAdW0tVUArAAkpAwk4DUu6QdGA95udBQK.webp"); // Initial preview image
13
+  const [isZoomed, setIsZoomed] = useState(false);
14
+
15
+  const thumbnails = [
16
+    "https://business.aducktive.com/storage/product/23/ceGt6VWGAdW0tVUArAAkpAwk4DUu6QdGA95udBQK.webp",
17
+    "https://business.aducktive.com/storage/product/24/z6wjsGoGb5X5F72TIW9JihYQR3ZnwEHFgcnfOCOF.webp",
18
+    "https://business.aducktive.com/storage/product/22/JtniBtfevbtO9iJy3LUozgyGGe2HLv2rVNZ7C16e.webp",
19
+    "https://business.aducktive.com/storage/product/25/GTyY9k0PvQUuC4cq5rUNgbIAw6H4vR6S5Ht3PSYn.webp",
20
+  ];
21
+
22
+  const handleThumbnailClick = (image) => {
23
+    setPreviewImage(image);
24
+  };
25
+
26
+  const handleZoomToggle = () => {
27
+    setIsZoomed(!isZoomed);
28
+  };
29
+
30
+  return (
31
+    <Box sx={{ flexGrow: 1 }}>
32
+      <Grid container spacing={2}>
33
+        {/* Image Preview Section */}
34
+        <Grid item size={12}>
35
+          <Box
36
+            sx={{
37
+              overflow: "hidden",
38
+              cursor: "pointer",
39
+            }}
40
+            onClick={handleZoomToggle}
41
+          >
42
+            <img
43
+              src={previewImage}
44
+              alt="Preview"
45
+              style={{
46
+                width: "100%",
47
+                height: "auto",
48
+                display: "block",
49
+              }}
50
+            />
51
+          </Box>
52
+        </Grid>
53
+
54
+        {/* Image Control Section */}
55
+        <Grid item size={12}>
56
+          <Box
57
+            sx={{
58
+              display: "flex",
59
+              flexDirection: "row",
60
+              justifyContent:"center",
61
+              padding: 2,
62
+              gap:2
63
+            }}
64
+          >
65
+            {thumbnails.map((thumbnail, index) => (
66
+              <IconButton
67
+                key={index}
68
+                onClick={() => handleThumbnailClick(thumbnail)}
69
+                sx={{
70
+                  borderRadius: 2,
71
+                  overflow: "hidden",
72
+                }}
73
+              >
74
+                <img
75
+                  src={thumbnail}
76
+                  alt={`Thumbnail ${index + 1}`}
77
+                  style={{
78
+                    width: "100%",
79
+                    height: "auto",
80
+                    maxWidth: "75px",
81
+                  }}
82
+                />
83
+              </IconButton>
84
+            ))}
85
+          </Box>
86
+        </Grid>
87
+
88
+      </Grid>
89
+
90
+      {/* Zoom Dialog */}
91
+      <Dialog open={isZoomed} onClose={handleZoomToggle} maxWidth="lg">
92
+        <DialogContent>
93
+          <img
94
+            src={previewImage}
95
+            alt="Zoomed Preview"
96
+            style={{
97
+              width: "100%",
98
+              height: "auto",
99
+            }}
100
+          />
101
+        </DialogContent>
102
+      </Dialog>
103
+    </Box>
104
+  );
105
+};
106
+
107
+export default ImageView;

+ 1
- 0
src/components/ImageView/index.js ファイルの表示

@@ -0,0 +1 @@
1
+export { default } from "./ImageView"

+ 72
- 0
src/components/NewsLetter/NewsLetter.jsx ファイルの表示

@@ -0,0 +1,72 @@
1
+import React from 'react';
2
+import { Box, Button, TextField, InputAdornment, Typography } from '@mui/material';
3
+
4
+
5
+
6
+const NewsLetter = () => {
7
+  return (
8
+    <Box
9
+      sx={{
10
+        position: 'relative',
11
+        width: '100%',
12
+        height: 0,
13
+        paddingTop: '600px', // This sets the height based on top padding
14
+        overflow: 'hidden',
15
+        display: "flex"
16
+      }}
17
+    >
18
+      <Box
19
+        sx={{
20
+          position: 'absolute',
21
+          top: 0,
22
+          left: 0,
23
+          width: '100%',
24
+          height: '100%',
25
+          display: 'flex',
26
+          backgroundColor: 'rgba(50, 50, 50, 0.5)', // Filter overlay
27
+          flexDirection: 'column',
28
+          justifyContent: 'center',
29
+          alignItems: 'center',
30
+          color: '#fff', // Text and button color for visibility
31
+        }}
32
+      >
33
+
34
+        <Box sx={{ width: "35%", backgroundColor: "rgba(255,255,255, 0.5)", padding: 10, textAlign:"center", color:"black" }}>
35
+
36
+          <Typography variant='h3'>
37
+            Let's Stay in touch
38
+          </Typography>
39
+          <Typography variant='body1'>
40
+            Enjoy 15% off your first order when you join our mailing list.
41
+          </Typography>
42
+          <TextField
43
+            label="Enter your email address"
44
+            variant="outlined"
45
+            fullWidth
46
+            sx={{ backgroundColor: "white", my:4 }}
47
+            InputProps={{
48
+              endAdornment: (
49
+                <InputAdornment position="end">
50
+                  <Button
51
+                    variant="contained"
52
+                    color="primary"
53
+                    sx={{ height: "100%", borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }}
54
+                  >
55
+                    Send
56
+                  </Button>
57
+                </InputAdornment>
58
+              )
59
+            }}
60
+          />
61
+
62
+          <Typography variant='body1'>
63
+            We respect your privacy, so we never share your info.
64
+          </Typography>
65
+        </Box>
66
+
67
+      </Box>
68
+    </Box>
69
+  );
70
+};
71
+
72
+export default NewsLetter;

+ 1
- 0
src/components/NewsLetter/index.js ファイルの表示

@@ -0,0 +1 @@
1
+export { default } from './NewsLetter'

+ 109
- 0
src/components/ProductDetails/ProductDetails.jsx ファイルの表示

@@ -0,0 +1,109 @@
1
+import React from "react";
2
+import {
3
+  Box,
4
+  Typography,
5
+  Select,
6
+  MenuItem,
7
+  Button,
8
+  FormControl,
9
+  InputLabel,
10
+} from "@mui/material";
11
+import Grid from '@mui/material/Grid2';
12
+
13
+const ProductDetails = () => {
14
+  return (
15
+    <Box sx={{ position: "relative"}}>
16
+      {/* Flex Container */}
17
+      <Box sx={{ display: "flex", flexDirection: "column", gap: 2}}>
18
+        {/* Section 1: Product Info */}
19
+        <Box>
20
+          <Typography variant="h5" sx={{fontWeight:"bold", mb:2}}>Product Name</Typography>
21
+          <Typography variant="body2" color="text.secondary">
22
+            Product Type
23
+          </Typography>
24
+          <Typography
25
+            variant="body1"
26
+            sx={{ fontWeight: "bold" }}
27
+          >
28
+            $99.99
29
+          </Typography>
30
+        </Box>
31
+
32
+        {/* Section 2: Description */}
33
+        <Box sx={{mb:5}}>
34
+          <Typography variant="h6" color="text.secondary" sx={{fontWeight:"bold", mb:3}}>
35
+            Description
36
+          </Typography>
37
+          <Typography variant="body1" color="text.secondary" sx={{fontWeight:"400", mb:3 }}>
38
+            Materials : Plain Soft Crepe with embroidery.
39
+          </Typography>
40
+          <Typography variant="body1" color="text.secondary" sx={{fontWeight:"400" }}>
41
+            Care Instruction : Handwash for better care - Machine wash cotton items in cold or warm water. Do not use hot water as it may shrink the fabric - Use normal wash cycle and gentle detergent - Avoid using any harsh chemicals like bleach - Tumble dry on low setting, then promptly remove the item from the dryer to avoid wrinkles - Iron to remove wrinkle. Adding a spray starch will revive the crispness of cotton fabrics. Note : - Sale items are not returnable, exchangeable & refundable - Change of mind not applicable - Wrong washing, storing or ironing method which may cause product damage will not be entertained - Due to lighting effects, monitor’s brightness, contrast setting, etc., they could be some slight differences in the colour tone of the pictures and the actual item. Delivery : Postage will take around 3-5 working days from purchasing date
42
+          </Typography>
43
+        </Box>
44
+
45
+        {/* Section 3: Controls */}
46
+        <Grid container spacing={2} sx={{mt:"auto"}}>
47
+          {/* Size Select */}
48
+          <Grid item size={12}>
49
+            <FormControl fullWidth>
50
+              <InputLabel>Size</InputLabel>
51
+              <Select defaultValue="">
52
+                <MenuItem value="small">Small</MenuItem>
53
+                <MenuItem value="medium">Medium</MenuItem>
54
+                <MenuItem value="large">Large</MenuItem>
55
+              </Select>
56
+            </FormControl>
57
+          </Grid>
58
+
59
+          {/* Color Select */}
60
+          <Grid item size={12}>
61
+            <FormControl fullWidth>
62
+              <InputLabel>Color</InputLabel>
63
+              <Select defaultValue="">
64
+                <MenuItem value="red">Red</MenuItem>
65
+                <MenuItem value="blue">Blue</MenuItem>
66
+                <MenuItem value="green">Green</MenuItem>
67
+              </Select>
68
+            </FormControl>
69
+          </Grid>
70
+
71
+          {/* Material Select */}
72
+          <Grid item size={12}>
73
+            <FormControl fullWidth>
74
+              <InputLabel>Material</InputLabel>
75
+              <Select defaultValue="">
76
+                <MenuItem value="cotton">Cotton</MenuItem>
77
+                <MenuItem value="wool">Wool</MenuItem>
78
+                <MenuItem value="silk">Silk</MenuItem>
79
+              </Select>
80
+            </FormControl>
81
+          </Grid>
82
+
83
+          {/* Buy Now Button */}
84
+          <Grid item size={12}>
85
+            <Button
86
+              variant="contained"
87
+              color="common.black"
88
+              fullWidth
89
+              sx={{
90
+                backgroundColor: (theme) => theme.palette.common.black,
91
+                color: "white",
92
+                textTransform: "none",
93
+                mt: 2,
94
+                "&:hover": {
95
+                  backgroundColor: (theme) => theme.palette.grey[900],
96
+                },
97
+              }}
98
+            >
99
+              BUY NOW
100
+            </Button>
101
+          </Grid>
102
+        </Grid>
103
+      </Box>
104
+
105
+    </Box>
106
+  );
107
+};
108
+
109
+export default ProductDetails;

+ 1
- 0
src/components/ProductDetails/index.js ファイルの表示

@@ -0,0 +1 @@
1
+export { default } from './ProductDetails'

+ 120
- 0
src/components/ProductHistoryList/ProductHistoryList.jsx ファイルの表示

@@ -0,0 +1,120 @@
1
+import {useState} from 'react';
2
+import { Box, Typography, IconButton, Pagination } from '@mui/material';
3
+
4
+import Grid from '@mui/material/Grid2';
5
+
6
+const ProductHistoryList = () => {
7
+
8
+  const [currentPage, setCurrentPage] = useState(1);
9
+  const itemsPerPage = 10;
10
+  const totalPages = 5;
11
+
12
+  const handleChangePage = (event, value) => {
13
+    setCurrentPage(value);
14
+  };
15
+
16
+  const handlePrevious = () => {
17
+    setCurrentPage((prev) => (prev > 1 ? prev - 1 : 1));
18
+  };
19
+
20
+  const handleNext = () => {
21
+    setCurrentPage((prev) => (prev < totalPages ? prev + 1 : totalPages));
22
+  };
23
+
24
+  const images = [
25
+    {
26
+      url: 'https://via.placeholder.com/300',
27
+      title: 'KEMBOJA IN BEIGE',
28
+      price: 123.90,
29
+      description: "Atma Sari Kurta Raya Collection 2024",
30
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
31
+    },
32
+    {
33
+      url: 'https://via.placeholder.com/300',
34
+      title: 'KEMBOJA IN BEIGE',
35
+      price: 123.90,
36
+      description: "Atma Sari Kurta Raya Collection 2024",
37
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
38
+    },
39
+    {
40
+      url: 'https://via.placeholder.com/300',
41
+      title: 'KEMBOJA IN BEIGE',
42
+      price: 123.90,
43
+      description: "Atma Sari Kurta Raya Collection 2024",
44
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
45
+    },
46
+    {
47
+      url: 'https://via.placeholder.com/300',
48
+      title: 'KEMBOJA IN BEIGE',
49
+      price: 123.90,
50
+      description: "Atma Sari Kurta Raya Collection 2024",
51
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
52
+    },
53
+    {
54
+      url: 'https://via.placeholder.com/300',
55
+      title: 'KEMBOJA IN BEIGE',
56
+      price: 123.90,
57
+      description: "Atma Sari Kurta Raya Collection 2024",
58
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
59
+    },
60
+    {
61
+      url: 'https://via.placeholder.com/300',
62
+      title: 'KEMBOJA IN BEIGE',
63
+      price: 123.90,
64
+      description: "Atma Sari Kurta Raya Collection 2024",
65
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
66
+    }
67
+  ];
68
+
69
+  return (
70
+    <Box sx={{ mb: 5 }}>
71
+      <Grid container spacing={1} columns={12}>
72
+        {images.map((image, index) => (<Grid item size={2} key={index}>
73
+          <Box
74
+            sx={{
75
+              overflow: 'hidden',
76
+              position: 'relative'
77
+            }}
78
+          >
79
+            <img
80
+              src={image.url}
81
+              alt={image.title}
82
+              style={{
83
+                width: '100%',
84
+                aspectRatio: '4 / 4',
85
+                objectFit: 'cover',
86
+              }}
87
+            />
88
+
89
+            <Box sx={{ py: 5 }}>
90
+              <Typography variant="h5" sx={{ fontWeight: "bolder" }}>
91
+                {image.title}
92
+              </Typography>
93
+              <Typography variant="h6" >
94
+                {`RM ${image.price}`}
95
+              </Typography>
96
+            </Box>
97
+          </Box>
98
+        </Grid>))}
99
+      </Grid>
100
+      {/* Pagination Controls */}
101
+      <Box
102
+        sx={{
103
+          display: 'flex',
104
+          justifyContent: 'center',
105
+          alignItems: 'center',
106
+          mt: 4,
107
+        }}
108
+      >
109
+        <Pagination
110
+          count={totalPages}
111
+          page={currentPage}
112
+          onChange={handleChangePage}
113
+          sx={{ mx: 2 }}
114
+        />
115
+      </Box>
116
+    </Box>
117
+  );
118
+};
119
+
120
+export default ProductHistoryList;

+ 1
- 0
src/components/ProductHistoryList/index.js ファイルの表示

@@ -0,0 +1 @@
1
+export { default } from './ProductHistoryList'

+ 10
- 1
src/components/ProductList/ProductList.jsx ファイルの表示

@@ -8,6 +8,7 @@ const ProductList = ({ size }) => {
8 8
 
9 9
   const images = [
10 10
     {
11
+      id: 1,
11 12
       url: 'https://via.placeholder.com/300',
12 13
       title: 'KEMBOJA IN BEIGE',
13 14
       price: 123.90,
@@ -15,6 +16,7 @@ const ProductList = ({ size }) => {
15 16
       extra_desc: "or 3 payments of 68.50 MYR with Atome"
16 17
     },
17 18
     {
19
+      id: 2,
18 20
       url: 'https://via.placeholder.com/300',
19 21
       title: 'KEMBOJA IN BEIGE',
20 22
       price: 123.90,
@@ -22,6 +24,7 @@ const ProductList = ({ size }) => {
22 24
       extra_desc: "or 3 payments of 68.50 MYR with Atome"
23 25
     },
24 26
     {
27
+      id: 3,
25 28
       url: 'https://via.placeholder.com/300',
26 29
       title: 'KEMBOJA IN BEIGE',
27 30
       price: 123.90,
@@ -29,6 +32,7 @@ const ProductList = ({ size }) => {
29 32
       extra_desc: "or 3 payments of 68.50 MYR with Atome"
30 33
     },
31 34
     {
35
+      id: 4,
32 36
       url: 'https://via.placeholder.com/300',
33 37
       title: 'KEMBOJA IN BEIGE',
34 38
       price: 123.90,
@@ -36,6 +40,7 @@ const ProductList = ({ size }) => {
36 40
       extra_desc: "or 3 payments of 68.50 MYR with Atome"
37 41
     },
38 42
     {
43
+      id: 5,
39 44
       url: 'https://via.placeholder.com/300',
40 45
       title: 'KEMBOJA IN BEIGE',
41 46
       price: 123.90,
@@ -43,6 +48,7 @@ const ProductList = ({ size }) => {
43 48
       extra_desc: "or 3 payments of 68.50 MYR with Atome"
44 49
     },
45 50
     {
51
+      id: 6,
46 52
       url: 'https://via.placeholder.com/300',
47 53
       title: 'KEMBOJA IN BEIGE',
48 54
       price: 123.90,
@@ -60,10 +66,13 @@ const ProductList = ({ size }) => {
60 66
 
61 67
             return <Grid item size={4} key={index}>
62 68
               <Box
69
+                onClick={()=>{ window.location.href = `/products/${image.id}` }}
63 70
                 sx={{
64 71
                   overflow: 'hidden',
65
-                  position: 'relative'
72
+                  position: 'relative',
73
+                  cursor: 'pointer'
66 74
                 }}
75
+        
67 76
               >
68 77
                 <img
69 78
                   src={image.url}

+ 74
- 0
src/components/ProductSuggestion/ProductSuggestion.jsx ファイルの表示

@@ -0,0 +1,74 @@
1
+import React from 'react';
2
+import { Box, Typography, Button } from '@mui/material';
3
+
4
+import Grid from '@mui/material/Grid2';
5
+
6
+const ProductSuggestion = () => {
7
+
8
+  const images = [
9
+    {
10
+      url: 'https://via.placeholder.com/300',
11
+      title: 'KEMBOJA IN BEIGE',
12
+      price: 123.90,
13
+      description: "Atma Sari Kurta Raya Collection 2024",
14
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
15
+    },
16
+    {
17
+      url: 'https://via.placeholder.com/300',
18
+      title: 'KEMBOJA IN BEIGE',
19
+      price: 123.90,
20
+      description: "Atma Sari Kurta Raya Collection 2024",
21
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
22
+    },
23
+    {
24
+      url: 'https://via.placeholder.com/300',
25
+      title: 'KEMBOJA IN BEIGE',
26
+      price: 123.90,
27
+      description: "Atma Sari Kurta Raya Collection 2024",
28
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
29
+    },
30
+    {
31
+      url: 'https://via.placeholder.com/300',
32
+      title: 'KEMBOJA IN BEIGE',
33
+      price: 123.90,
34
+      description: "Atma Sari Kurta Raya Collection 2024",
35
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
36
+    }
37
+  ];
38
+
39
+  return (
40
+    <Box sx={{ mb: 5 }}>
41
+      <Grid container spacing={1} columns={12}>
42
+        {images.map((image, index) => (<Grid item size={3} key={index}>
43
+          <Box
44
+            sx={{
45
+              overflow: 'hidden',
46
+              position: 'relative'
47
+            }}
48
+          >
49
+            <img
50
+              src={image.url}
51
+              alt={image.title}
52
+              style={{
53
+                width: '100%',
54
+                aspectRatio: '4 / 4',
55
+                objectFit: 'cover',
56
+              }}
57
+            />
58
+
59
+            <Box sx={{ py: 5 }}>
60
+              <Typography variant="h5" sx={{ fontWeight: "bolder" }}>
61
+                {image.title}
62
+              </Typography>
63
+              <Typography variant="h6" >
64
+                {`RM ${image.price}`}
65
+              </Typography>
66
+            </Box>
67
+          </Box>
68
+        </Grid>))}
69
+      </Grid>
70
+    </Box>
71
+  );
72
+};
73
+
74
+export default ProductSuggestion;

+ 1
- 0
src/components/ProductSuggestion/index.js ファイルの表示

@@ -0,0 +1 @@
1
+export { default } from './ProductSuggestion'

+ 41
- 0
src/components/ProductType/ProductType.jsx ファイルの表示

@@ -0,0 +1,41 @@
1
+import React from 'react';
2
+import { Box, Button, Typography } from '@mui/material';
3
+
4
+const ProductType = () => {
5
+  return (
6
+    <Box
7
+      sx={{
8
+        position: 'relative',
9
+        width: '100%',
10
+        height: 0,
11
+        paddingTop: '600px', // This sets the height based on top padding
12
+        overflow: 'hidden',
13
+      }}
14
+    >
15
+      <Box
16
+        sx={{
17
+          position: 'absolute',
18
+          top: 0,
19
+          left: 0,
20
+          width: '100%',
21
+          height: '100%',
22
+          backgroundColor: 'rgba(0, 0, 0, 0.5)', // Filter overlay
23
+          display: 'flex',
24
+          flexDirection: 'column',
25
+          justifyContent: 'center',
26
+          alignItems: 'center',
27
+          color: '#fff', // Text and button color for visibility
28
+        }}
29
+      >
30
+        <Typography variant="h4" gutterBottom>
31
+          Some Type
32
+        </Typography>
33
+        <Button variant="contained" color="primary">
34
+          SHOP NOW
35
+        </Button>
36
+      </Box>
37
+    </Box>
38
+  );
39
+};
40
+
41
+export default ProductType;

+ 1
- 0
src/components/ProductType/index.js ファイルの表示

@@ -0,0 +1 @@
1
+export { default } from './ProductType'

+ 45
- 0
src/components/VideoAds/VideoAds.jsx ファイルの表示

@@ -0,0 +1,45 @@
1
+import React from 'react';
2
+import { Box } from '@mui/material';
3
+import PropTypes from 'prop-types';
4
+
5
+const VideoAds = ({ video_url, height, width }) => {
6
+  return (
7
+    <Box
8
+      sx={{
9
+        position: 'relative',
10
+        overflow: 'hidden',
11
+        width: width || '100%',
12
+        height: height || '300px',
13
+      }}
14
+    >
15
+      <video
16
+        src={video_url}
17
+        autoPlay
18
+        loop
19
+        muted
20
+        playsInline
21
+        style={{
22
+          position: 'absolute',
23
+          top: 0,
24
+          left: 0,
25
+          width: '100%',
26
+          height: 'auto',
27
+        }}
28
+      />
29
+    </Box>
30
+  );
31
+};
32
+
33
+VideoAds.propTypes = {
34
+  video_url: PropTypes.string.isRequired,
35
+  height: PropTypes.string,
36
+  width: PropTypes.string,
37
+};
38
+
39
+VideoAds.defaultProps = {
40
+  video_url: 'https://www.w3schools.com/html/mov_bbb.mp4',
41
+  height: '300px',
42
+  width: '100%',
43
+};
44
+
45
+export default VideoAds;

+ 1
- 0
src/components/VideoAds/index.js ファイルの表示

@@ -0,0 +1 @@
1
+export { default } from './VideoAds'

+ 37
- 2
src/pages/Home.jsx ファイルの表示

@@ -1,12 +1,16 @@
1 1
 import React from 'react'
2 2
 import { Box, Typography } from '@mui/material'
3
+import Grid from '@mui/material/Grid2';
3 4
 import Carousel from '../components/Carousel'
4 5
 import ProductSelected from '../components/ProductSelected'
5 6
 import SocialMedia from '../components/SocialMedia'
6 7
 import Feature from '../components/Feature'
7
-import {Link} from '@mui/material'
8
+import { Link } from '@mui/material'
9
+import VideoAds from '../components/VideoAds'
8 10
 import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
9 11
 import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
12
+import ProductType from '../components/ProductType';
13
+import NewsLetter from '../components/NewsLetter';
10 14
 
11 15
 const Home = () => {
12 16
 
@@ -38,11 +42,42 @@ const Home = () => {
38 42
           <Link href="#" sx={{ position: "absolute", right: 0, textDecoration: "underline" }}>VIEW ALL</Link>
39 43
 
40 44
         </Box>
41
-
42 45
         <ProductSelected />
46
+      </Box>
47
+
48
+      <VideoAds width={"100%"} height={700} />
49
+
50
+      <Box sx={{ px: 24, mb: 10 }}>
51
+
52
+
53
+        <Box sx={{ flexGrow: 1, mt: 10 }}>
54
+          <Grid container spacing={2}>
55
+            <Grid size={12}>
56
+              <ProductType />
57
+            </Grid>
58
+            <Grid size={6}>
59
+              <ProductType />
60
+            </Grid>
61
+            <Grid size={6}>
62
+              <ProductType />
63
+            </Grid>
64
+            <Grid size={12}>
65
+              <ProductType />
66
+            </Grid>
67
+          </Grid>
68
+        </Box>
69
+
70
+      </Box>
71
+
72
+      <NewsLetter />
73
+
74
+      <Box sx={{ px: 24, my: 10 }}>
75
+
43 76
         <SocialMedia />
44 77
         <Feature />
45 78
       </Box>
79
+
80
+
46 81
     </>
47 82
   )
48 83
 }

+ 63
- 4
src/pages/Products/Product.jsx ファイルの表示

@@ -1,6 +1,13 @@
1 1
 import React, { useEffect } from 'react'
2
-import { useParams } from 'react-router-dom'
3
-
2
+import { Box, Typography } from '@mui/material';
3
+import { useParams } from 'react-router-dom';
4
+import Grid from '@mui/material/Grid2';
5
+import ImageView from '../../components/ImageView/ImageView';
6
+import ProductDetails from '../../components/ProductDetails';
7
+import ProductSuggestion from '../../components/ProductSuggestion';
8
+import ProductHistoryList from '../../components/ProductHistoryList';
9
+import SocialMedia from '../../components/SocialMedia'
10
+import Feature from '../../components/Feature'
4 11
 
5 12
 const Product = () => {
6 13
 
@@ -8,10 +15,62 @@ const Product = () => {
8 15
 
9 16
   useEffect(() => {
10 17
 
11
-  },[])
18
+  }, [])
12 19
 
13 20
   return (
14
-    <div>{`Product: ${pid}`}</div>
21
+
22
+    <Box sx={{ mt: 10, px: 24 }}>
23
+      <Grid container spacing={0}>
24
+        <Grid size={6}>
25
+          <Box sx={{ paddingRight: 1 }}>
26
+            <Box>
27
+              <ImageView />
28
+            </Box>
29
+          </Box>
30
+        </Grid>
31
+
32
+        <Grid size={6} xs>
33
+          <Box>
34
+            <Box>
35
+              <ProductDetails />
36
+            </Box>
37
+          </Box>
38
+        </Grid>
39
+      </Grid>
40
+
41
+      <Box sx={{
42
+        width: "100%",
43
+        borderTop: "1px solid rgba(0,0,0,0.2)",
44
+        py: 4,
45
+        textAlign: "center"
46
+      }}>
47
+        <Typography variant='body1' sx={{ fontWeight: "400", mb: 4 }}>
48
+          YOU MAY ALSO LIKE
49
+        </Typography>
50
+
51
+        <ProductSuggestion />
52
+
53
+      </Box>
54
+
55
+      <Box sx={{
56
+        width: "100%",
57
+        borderTop: "1px solid rgba(0,0,0,0.2)",
58
+        py: 4,
59
+        textAlign: "center"
60
+      }}>
61
+        <Typography variant='body1' sx={{ fontWeight: "400", mb: 4 }}>
62
+          RECENTLY VIEWED 
63
+        </Typography>
64
+
65
+        <ProductHistoryList />
66
+
67
+      </Box>
68
+
69
+
70
+      <SocialMedia />
71
+      <Feature />
72
+    </Box>
73
+
15 74
   )
16 75
 }
17 76
 

+ 1
- 1
src/theme/theme.js ファイルの表示

@@ -7,7 +7,7 @@ let theme = createTheme({
7 7
         main:"#95AAC5"
8 8
     },
9 9
     secondary:{
10
-        main:"##A3ADAE"
10
+        main:"#A3ADAE"
11 11
     },
12 12
     background:{
13 13
         paper:"#CCC",

読み込み中…
キャンセル
保存