Skip to content
Snippets Groups Projects
Commit ca56a046 authored by Maximilian Sjöström's avatar Maximilian Sjöström
Browse files

merge conflicts

parents a7797661 e637f57b
No related branches found
No related tags found
1 merge request!13Profile design
......@@ -5,6 +5,7 @@ import { Grid, ThemeProvider, Typography } from '@mui/material';
import './Home.css';
import ProductViewer from './ProductViewer.js';
import theme from './styles/theme.js'
import Product from './components/Product.js'
const Home = () => {
......@@ -42,23 +43,19 @@ const Home = () => {
});
}, []);
if (loading) return <p>Loading...</p>;
if (error) return <p>Error loading products: {error.message}</p>;
// 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 },
// // Add more products as needed
// ];
/*const products = [
{ 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
];*/
return (
<ThemeProvider theme={theme}>
......@@ -94,7 +91,7 @@ if (error) return <p>Error loading products: {error.message}</p>;
name={product.name}
size={product.size}
/>
<ProductViewer product={product} />
</Grid>
))}
</Grid>
......@@ -105,3 +102,15 @@ if (error) return <p>Error loading products: {error.message}</p>;
};
export default Home;
//<Product
//id={product.id}
//ownerID={product.ownerID}
//imageUrl={product.imageUrl}
//price={product.price}
//rentPrice={product.rentPrice}
//name={product.name}
//size={product.size}
///>
//<ProductViewer product={product} />
\ No newline at end of file
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