getcable
This commit is contained in:
@ -19,23 +19,23 @@ class cable {
|
||||
this.name = name;
|
||||
this.brand = brand;
|
||||
this.description = description;
|
||||
this.short_description = short_description;
|
||||
if (image === undefined) {
|
||||
this.image = DefaultPartImg;
|
||||
} else {
|
||||
this.image = image;
|
||||
}
|
||||
this.short_description = short_description
|
||||
? short_description
|
||||
: description;
|
||||
this.image = image
|
||||
? `http://localhost${image}`
|
||||
: DefaultPartImg;
|
||||
}
|
||||
|
||||
returnDiv() {
|
||||
return (
|
||||
<NavLink className="browse-cable" to={"/cable/" + this.part_number}>
|
||||
<NavLink className="browse-cable" to={"/browse/cable/" + this.position}>
|
||||
<img className="browse-cable-image" src={this.image} alt="Cable" />
|
||||
<div className="browse-cable-label">
|
||||
<div className="browse-cable-name">{this.name}</div>
|
||||
<div className="browse-cable-description">
|
||||
<span style={{ color: "#007cbe" }}></span>
|
||||
{this.description}
|
||||
{this.short_description}
|
||||
</div>
|
||||
<div className="browse-cable-brand">
|
||||
<span style={{ color: "black", backgroundColor: "transparent" }}>
|
||||
@ -85,6 +85,7 @@ export default class BrowseComponent extends Component {
|
||||
let map = message.data.map;
|
||||
for (let i = 0; i < map.length; i++) {
|
||||
let part_number = map[i].part_number;
|
||||
let image = map[i].image;
|
||||
let position = map[i].position;
|
||||
let name = map[i].name;
|
||||
let brand = map[i].brand;
|
||||
@ -97,7 +98,8 @@ export default class BrowseComponent extends Component {
|
||||
name,
|
||||
brand,
|
||||
description,
|
||||
short_description
|
||||
short_description,
|
||||
image
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user