Connecting PDP page to data

parent c7eb99dc
.appFooter {
// position: fixed;
bottom: 0;
left: 0;
}
\ No newline at end of file
import React, { Component } from 'react';
import style from './PDP.module.scss';
import Product from 'models/product';
import ProductDetails from 'models/productDetail';
class PDPPage extends Component {
......@@ -10,9 +10,8 @@ class PDPPage extends Component {
}
render() {
const image = { url: 'https://www.westelm.com/weimgs/rk/images/wcm/products/202003/0005/belgian-linen-ladder-stripe-embroidery-duvet-cover-shams-s-m.jpg' };
const { product } = this.props;
const { name, } = new Product(product);
const { name, image, sellingPrice } = new ProductDetails(product);
return (
<section className={style.PDPPage}>
<div className={style.content}>
......@@ -25,7 +24,7 @@ class PDPPage extends Component {
</div>
<div className={style.details}>
<h1>{name}</h1>
<div>Price: 44 - 329</div>
<div>{`Price: ${sellingPrice}`}</div>
</div>
</div>
</section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment