index.js 893 B

1234567891011121314151617181920212223242526
  1. import { Box, Stack, Typography } from "@mui/material";
  2. import { useSelector } from "react-redux";
  3. import MainPageImage from "../../images/main-page-image.png";
  4. import { GoodCardSlider } from "../common/GoodCardSlider";
  5. const MainPage = () => {
  6. const popularGoods = useSelector((state) => state.promise?.goodsPopular?.payload || []);
  7. return (
  8. <Box className="MainPage">
  9. <Stack spacing={3}>
  10. <Box component="img" src={MainPageImage} className="MainPageImage" />
  11. <Box>
  12. <Typography variant="h5" color="#79747E" textAlign="left">
  13. Популярні товари
  14. </Typography>
  15. </Box>
  16. <Box>
  17. <GoodCardSlider goods={popularGoods} />
  18. </Box>
  19. </Stack>
  20. </Box>
  21. );
  22. };
  23. export { MainPage };