CAdFeed.js 949 B

123456789101112131415161718192021222324252627
  1. import React from "react";
  2. import {Link} from 'react-router-dom';
  3. import { Container } from "react-bootstrap";
  4. import nofoto from '../images/placeholder.png'
  5. export const AdFeed=({_id, price,title,description,images,comments,createdAt}) => {
  6. return (
  7. <Container>
  8. <div className="row ad ">
  9. <div className="col img">
  10. {images ?
  11. <img src = {`http://marketplace.asmer.fs.a-level.com.ua/${images[0]?.url}`} />
  12. : <img src={nofoto} />
  13. }
  14. </div>
  15. <div className="col-6 info">
  16. <Link to={ `/home/${_id}`}>{title}</Link>
  17. <p>{description}</p>
  18. </div>
  19. <div className="col price">
  20. <p>{`Цена: ${price ? price : "0"} грн.`}</p>
  21. </div>
  22. </div>
  23. </Container>
  24. )
  25. }