source: phonelux-frontend/src/components/CheaperOffersComponent/CheaperOffersComponent.js@ 7e88e46

Last change on this file since 7e88e46 was 7e88e46, checked in by Marko <Marko@…>, 22 months ago

Added more components

  • Property mode set to 100644
File size: 1.9 KB
Line 
1import React, { Component } from 'react'
2import Box from '@mui/material/Box';
3import Modal from '@mui/material/Modal';
4import "./CheaperOffersComponent.css"
5import PhoneOfferComponent from '../PhoneOfferComponent/PhoneOfferComponent';
6import { Link } from 'react-router-dom';
7
8
9export class CheaperOffersComponent extends Component {
10constructor(props) {
11 super(props)
12
13 this.state = {
14
15 }
16}
17
18 render() {
19
20 return (
21 <div>
22 <Modal
23 open={this.props.openModal}
24 onClose={this.props.handleClose}
25 aria-labelledby="cheaperoffers-modal-title"
26 aria-describedby="cheaperoffers-modal-description"
27 >
28 <Box className='cheaperoffers-modal-box'>
29 <table cellPadding={20} className='cheaperoffers-table'>
30 <thead className='cheaperoffers-table-head'>
31 <tr>
32 <th>Продавница</th>
33 <th>Име на понуда</th>
34 <th>Цена</th>
35 <th>Поевтина за</th>
36 <th></th>
37 </tr>
38 </thead>
39 <tbody>
40 {
41 this.props.cheaperOffers.map((offer,idx) =>
42 <tr key={idx} className='cheaperoffers-table-row'>
43 <td>{offer.offer_shop}</td>
44 <td><a href={offer.offer_url}>{offer.offer_name}</a></td>
45 <td>{offer.price} ден.</td>
46 <td><b>{this.props.openedOfferPrice-offer.price} ден.</b></td>
47 <td>
48 <Link style={{ textDecoration: 'none' }} to={"/phoneoffer/"+offer.id}>
49 <button className='phone-offer-specifications-button'>Спецификации</button>
50 </Link>
51 </td>
52 </tr>
53 )
54 }
55 </tbody>
56 </table>
57 </Box>
58 </Modal>
59 </div>
60 )
61 }
62}
63
64export default CheaperOffersComponent
65
66
Note: See TracBrowser for help on using the repository browser.