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.

DeleteOfferLabeledCard.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import React from "react";
  2. import PropTypes from "prop-types";
  3. import {
  4. OfferDescriptionContainer,
  5. OfferImage,
  6. OfferImageContainer,
  7. OfferInfo,
  8. RemoveIcon,
  9. RemoveIconContainer,
  10. } from "./DeleteOfferLabeledCard.styled";
  11. import {
  12. getImageUrl,
  13. variants,
  14. } from "../../../../../util/helpers/imageUrlGetter";
  15. import useIsMobile from "../../../../../hooks/useIsMobile";
  16. const DeleteOfferLabeledCard = (props) => {
  17. const { isMobile } = useIsMobile();
  18. return (
  19. <OfferInfo>
  20. <OfferImageContainer>
  21. <OfferImage
  22. src={getImageUrl(
  23. props.offer.images[0],
  24. variants.deleteChat,
  25. isMobile
  26. )}
  27. />
  28. </OfferImageContainer>
  29. <OfferDescriptionContainer
  30. offerName={props.offer.name}
  31. categoryName={props.offer.category.name}
  32. />
  33. <RemoveIconContainer>
  34. <RemoveIcon />
  35. </RemoveIconContainer>
  36. </OfferInfo>
  37. );
  38. };
  39. DeleteOfferLabeledCard.propTypes = {
  40. offer: PropTypes.node,
  41. };
  42. export default DeleteOfferLabeledCard;