Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TDDD27_2024
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marc Taylor
TDDD27_2024
Commits
ca56a046
Commit
ca56a046
authored
9 months ago
by
Maximilian Sjöström
Browse files
Options
Downloads
Plain Diff
merge conflicts
parents
a7797661
e637f57b
No related branches found
No related tags found
1 merge request
!13
Profile design
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theme-costume-app/src/Home.js
+27
-18
27 additions, 18 deletions
theme-costume-app/src/Home.js
with
27 additions
and
18 deletions
theme-costume-app/src/Home.js
+
27
−
18
View file @
ca56a046
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment