You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
import React, { Component } from 'react'; |
|
import {Link} from 'react-router-dom'; |
|
|
|
import './index.scss'; |
|
export default class Simple extends Component { |
|
render() { |
|
const { height, data } = this.props; |
|
return( |
|
<article className="slider-simple d-flex flex-column" |
|
style={{ |
|
height: height, |
|
}}> |
|
<Link to={`/books/${data.id}`}> |
|
<img src={data.image} alt={data.title} /> |
|
<h1>{data.title}</h1> |
|
<h2>{data.subTitle}</h2> |
|
{ |
|
data.price ? |
|
<div className="slider-simple__price d-flex justify-content-center"> |
|
{ |
|
data.oldPrice ? |
|
<div> |
|
<div className="slider-simple__price--old d-flex"> |
|
{data.oldPrice} تومان |
|
<span></span> |
|
</div> |
|
|
|
</div> : null |
|
} |
|
<div className="slider-simple__price--price">{data.price} تومان</div> |
|
</div> : |
|
<div className="slider-simple__notAvailabe">ناموجود</div> |
|
} |
|
</Link> |
|
</article> |
|
|
|
); |
|
} |
|
} |