CAdFeed.js 1.0 KB

123456789101112131415161718192021222324252627282930
  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}) => {
  6. return (
  7. <Container>
  8. {title !== null &&
  9. <div className="row ad ">
  10. <div className="col img">
  11. {images ?
  12. <img src = {`http://marketplace.asmer.fs.a-level.com.ua/${images[0]?.url}`} />
  13. : <img src={nofoto} />
  14. }
  15. </div>
  16. <div className="col-6 info">
  17. <Link to={ `/home/${_id}`}>{title}</Link>
  18. <p>{description}</p>
  19. </div>
  20. <div className="col price">
  21. <p>{`Цена: ${price ? price : "0"} грн.`}</p>
  22. </div>
  23. </div>
  24. }
  25. </Container>
  26. )
  27. }