generated from nyu-software-engineering/generic-mern-stack-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from agiledev-students-spring2024/shiwen
Shiwen
- Loading branch information
Showing
5 changed files
with
100 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,44 @@ | ||
import React from 'react'; | ||
import '../styles/ItemDetail.css' | ||
import { useParams } from 'react-router-dom'; | ||
import OverlayMenu from '../components/OverlayMenu'; | ||
import '../styles/ItemDetail.css'; | ||
|
||
function ItemDetail() { | ||
return ( | ||
<div classname="Item Detail"> | ||
<div className='banner'> | ||
<h1>WARDROBE WIZARD</h1> | ||
<h3>Item Details</h3> | ||
<img src="item_image.jpg" alt="Item Image" /> | ||
<p> <strong style={{textDecoration: 'underline'}}> Item Detail</strong></p> | ||
<p>Brand Name</p> | ||
<p>Type</p> | ||
<p>Color</p> | ||
<p>Notes</p> | ||
</div> | ||
const ItemDetail = () => { | ||
let { id } = useParams(); // Use 'id' or 'itemName' based on your URL configuration | ||
// Fetch or import your item data here | ||
const item = { | ||
id, | ||
name: 'Example Item', | ||
brand: 'Brand A', | ||
type: 'Example Type', | ||
color: 'Example Color', | ||
notes: 'Some notes about the item', | ||
imageUrl: '/path/to/your/image.jpg' // This should be the path to the image file | ||
}; | ||
|
||
return ( | ||
<div className="item-detail"> | ||
<OverlayMenu /> | ||
<header className='ItemDetail-banner'> | ||
<h1>WARDROBE WIZARD</h1> | ||
<h3>Item Details</h3> | ||
</header> | ||
<div className="ItemDetail-info"> | ||
{item.imageUrl && ( | ||
<div className="ItemDetail-image" style={{ backgroundImage: `url(${item.imageUrl})` }}> | ||
{/* If no image is available, this div will show the placeholder */} | ||
</div> | ||
)} | ||
<div className="ItemDetail-info"> | ||
<h3>{item.name}</h3> | ||
<p>Brand: {item.brand}</p> | ||
<p>Type: {item.type}</p> | ||
<p>Color: {item.color}</p> | ||
<p>Notes: {item.notes}</p> | ||
</div> | ||
); | ||
} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ItemDetail; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters