Amber Shopify Project created using ReactJS+React-Redux with GraphQL API integration. Storefront Shopify API: https://github.com/Shopify/shopify-app-js/tree/main/packages/api-clients/storefront-api-client#readme
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Home.jsx 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import React from 'react'
  2. import { Box, Typography } from '@mui/material'
  3. import Grid from '@mui/material/Grid2';
  4. import Carousel from '../components/Carousel'
  5. import ProductSelected from '../components/ProductSelected'
  6. import SocialMedia from '../components/SocialMedia'
  7. import Feature from '../components/Feature'
  8. import { Link } from '@mui/material'
  9. import VideoAds from '../components/VideoAds'
  10. import ProductType from '../components/ProductType';
  11. import NewsLetter from '../components/NewsLetter';
  12. import ProductService from "../services/ProductService"
  13. import AmberHomeWallpaper from "../assets/images/titleBg.jpg";
  14. import AmberBeautyWallpaper from "../assets/images/amberBeautyWallpaper.jpg";
  15. import AmberClothing from "../assets/images/amberClothing.jpg"
  16. const Home = () => {
  17. React.useEffect(()=>{
  18. ProductService.getProducts();
  19. },[])
  20. return (
  21. <>
  22. <Carousel />
  23. <Box sx={{
  24. px: {
  25. xs: 2,
  26. md: 12,
  27. lg: 20
  28. },
  29. mb: {
  30. xs: 0,
  31. md: 5,
  32. lg: 10
  33. }
  34. }}>
  35. <ProductSelected />
  36. </Box>
  37. <VideoAds width={"100%"} height={{
  38. xs: 350,
  39. md: 500,
  40. lg: 750,
  41. }} />
  42. <Box sx={{
  43. px: {
  44. xs: 2,
  45. md: 12,
  46. lg: 20
  47. },
  48. mb: {
  49. xs: 2,
  50. md: 5,
  51. lg: 10
  52. }
  53. }}>
  54. <Box sx={{ flexGrow: 1, mt: 10 }}>
  55. <Grid container spacing={2}>
  56. <Grid size={12}>
  57. <ProductType title={'CLOTHING'} link={'/collection/clothing'} img_url={AmberClothing}/>
  58. </Grid>
  59. <Grid size={{xs:12, md:6}}>
  60. <ProductType title={'BEAUTY'} link={'/collection/beauty'} img_url={AmberBeautyWallpaper}/>
  61. </Grid>
  62. <Grid size={{xs:12, md:6}}>
  63. <ProductType title={'HOME'} link={'/collection/home'} img_url={AmberHomeWallpaper} />
  64. </Grid>
  65. </Grid>
  66. </Box>
  67. </Box>
  68. <NewsLetter />
  69. <Box sx={{ px:{
  70. xs:2,
  71. md:12,
  72. lg:20
  73. }, mb: 10 }}>
  74. <SocialMedia />
  75. <Feature />
  76. </Box>
  77. </>
  78. )
  79. }
  80. export default Home