Skip to content
Snippets Groups Projects
Commit 34c7711f authored by Marc Taylor's avatar Marc Taylor
Browse files

Merge branch 'product-backend'

parents a3924a17 89d8ec8f
No related branches found
No related tags found
No related merge requests found
......@@ -42,16 +42,16 @@ const Home = () => {
const products = [
{ id: 1, imageUrl: cheerleader, price: 29.99 },
{ id: 2, imageUrl: yellowSuit, price: 39.99 },
{ id: 3, imageUrl: glitterHatt, price: 49.99 },
{ id: 4, imageUrl: bananaCostume, price: 29.99 },
{ id: 5, imageUrl: grandma, price: 39.99 },
{ id: 6, imageUrl: cow, price: 49.99 },
{ id: 7, imageUrl: cheerleaderRed, price: 49.99 },
{ id: 8, imageUrl: nun, price: 29.99 },
{ id: 9, imageUrl: sjuksköterska, price: 39.99 },
{ id: 10, imageUrl: tennisProf, price: 49.99 },
{ id: 1, ownerID:1, imageUrl: cheerleader, price: 30, rentPrice: 15, name: 'Beskrivning', size: 'Medium'},
{ id: 2, ownerID:1, imageUrl: yellowSuit, price: 39.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium'},
{ id: 3, ownerID:1, imageUrl: glitterHatt, price: 49.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium'},
{ id: 4, ownerID:1, imageUrl: bananaCostume, price: 29.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium'},
{ id: 5, ownerID:1, imageUrl: grandma, price: 39.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium' },
{ id: 6, ownerID:1, imageUrl: cow, price: 49.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium' },
{ id: 7, ownerID:1, imageUrl: cheerleaderRed, price: 49.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium' },
{ id: 8, ownerID:1, imageUrl: nun, price: 29.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium' },
{ id: 9, ownerID:1, imageUrl: sjuksköterska, price: 39.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium' },
{ id: 10, ownerID:1, imageUrl: tennisProf, price: 49.99, rentPrice: 15, name: 'Beskrivning', size: 'Medium' },
// Add more products as needed
];
......@@ -79,7 +79,15 @@ const Home = () => {
<Grid container spacing={1}>
{products.map((product) => (
<Grid key={product.id} item xs={12} sm={6} md={4} lg={3}>
<Product imageUrl={product.imageUrl} price={product.price} />
<Product
id={product.id}
ownerID={product.ownerID}
imageUrl={product.imageUrl}
price={product.price}
rentPrice={product.rentPrice}
name={product.name}
size={product.size}
/>
</Grid>
))}
</Grid>
......
......@@ -13,7 +13,11 @@ const AnimatedCard = styled(Card)({
},
});
<<<<<<< HEAD
const Product = ({ id, imageUrl, price }) => {
=======
const Product = ({ id, ownerID, imageUrl, price, rentPrice, name, size }) => {
>>>>>>> product-backend
const [open, setOpen] = useState(false);
const {addToCart} = useCart();
......@@ -45,8 +49,20 @@ const Product = ({ id, imageUrl, price }) => {
alt="Product Image"
/>
<CardContent>
<Typography variant="h4" color='secondary' component="div">
{name}
</Typography>
<Typography variant="h5" color='secondary' component="div">
Pris: {price} kr
<<<<<<< HEAD
=======
</Typography>
<Typography variant="h5" color='secondary' component="div">
Hyrpris: {rentPrice} kr/dygn
</Typography>
<Typography variant="h5" color='secondary' component="div">
Storlek: {size}
>>>>>>> product-backend
</Typography>
</CardContent>
</AnimatedCard>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment