Last change
on this file since 7e88e46 was 7e88e46, checked in by Marko <Marko@…>, 2 years ago |
Added more components
|
-
Property mode
set to
100644
|
File size:
1.9 KB
|
Line | |
---|
1 | import React, { Component } from 'react'
|
---|
2 | import Box from '@mui/material/Box';
|
---|
3 | import Modal from '@mui/material/Modal';
|
---|
4 | import "./CheaperOffersComponent.css"
|
---|
5 | import PhoneOfferComponent from '../PhoneOfferComponent/PhoneOfferComponent';
|
---|
6 | import { Link } from 'react-router-dom';
|
---|
7 |
|
---|
8 |
|
---|
9 | export class CheaperOffersComponent extends Component {
|
---|
10 | constructor(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 |
|
---|
64 | export default CheaperOffersComponent
|
---|
65 |
|
---|
66 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.