import { CBuyButton } from "../common/BuyButton"; import { useSelector } from "react-redux"; import defaultGoodImage from "../../images/default-good-image.png"; import { Divider, Grid, Stack, Typography } from "@mui/material"; import { Box } from "@mui/system"; import { Carousel } from "react-responsive-carousel"; import { backendURL, mediaURL } from "../../helpers"; export const GoodPage = () => { const good = useSelector((state) => state.promise?.goodById?.payload || {}); const { _id = "", name = "", price = "", description = "", images = [] } = good || {}; return ( {(!!good?.images?.length ? good?.images : [{ _id: 0, url: defaultGoodImage }]).map((image) => ( { currentTarget.onerror = null; currentTarget.src = defaultGoodImage; }} /> ))} Ціна: {price} ₴ Назва: {name} Опис:
{description}
); };