Skip to content
Open

pics #36

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/EntranceItems.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class EntranceItems extends React.Component {

render() {
return (
<Row className="m-4 p-4">
<Row className="m-4 p-4 ">
{this.state.products.map(one => {
return (
<Col key={one._id} sm="3">
<Card className="my-2">
<CardImg
<CardImg className="border"
top
width="100%"
src={"http://127.0.0.1:3000/api/uploads/" + one.photo}
Expand Down
68 changes: 34 additions & 34 deletions client/Posts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,39 @@ import {
Button
} from "reactstrap";

var Posts = (props)=> (
<div>
{props.items?props.items.map(one => (
<div key={one._id}>
{/* <CardText tag={Link} to={"/" + one.user.username}>{one.user.firstname} {one.user.lastname}</CardText> */}
<Card
key={one._id}
style={{
display: "flex",
flexDirection: "row",
marginBottom: "8px"
}}
>
<div style={{ flex: 4 }}>
<img
width="100%"
src={"http://127.0.0.1:3000/api/uploads/" + one.photo}
alt="Card image cap"
/>
</div>
<div style={{ flex: 6, marginLeft: "7px" }}>
<CardTitle tag={Link} to={"items/" + one._id } className="mb-1">{one.name}</CardTitle>
<br/>
<small className="text-muted">
<CardText tag={Link} to={"/users/" + one.user.username}>{one.user.firstname} {one.user.lastname}</CardText>
</small>
<CardText>Description: {one.description}</CardText>
<small className="text-muted">
<span>Price: ${one.price}</span> &nbsp;&nbsp; <span>Availability: {one.available?"✔":"❌" }</span> &nbsp;&nbsp; <span>Quantity: {one.quantity}</span>
</small>
</div>
</Card>
</div>
)): null}
var Posts = (props) => (
<div >
{props.items ? props.items.map(one => (
<div key={one._id} >
{/* <CardText tag={Link} to={"/" + one.user.username}>{one.user.firstname} {one.user.lastname}</CardText> */}
<Card
key={one._id}
style={{
display: "flex",
flexDirection: "row",
marginBottom: "8px"
}}
>
<div style={{ flex: 4 }}>
<img
width="100%"
src={"http://127.0.0.1:3000/api/uploads/" + one.photo}
alt="Card image cap"
/>
</div>
<div style={{ flex: 6, marginLeft: "7px" }}>
<CardTitle tag={Link} to={"items/" + one._id} className="mb-1">{one.name}</CardTitle>
<br />
<small className="text-muted">
<CardText tag={Link} to={"/users/" + one.user.username}>{one.user.firstname} {one.user.lastname}</CardText>
</small>
<CardText>Description: {one.description}</CardText>
<small className="text-muted">
<span>Price: ${one.price}</span> &nbsp;&nbsp; <span>Availability: {one.available ? "✔" : "❌"}</span> &nbsp;&nbsp; <span>Quantity: {one.quantity}</span>
</small>
</div>
</Card>
</div>
)) : null}
</div>)
export default Posts
Loading