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
34c7711f
Commit
34c7711f
authored
9 months ago
by
Marc Taylor
Browse files
Options
Downloads
Plain Diff
Merge branch 'product-backend'
parents
a3924a17
89d8ec8f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theme-costume-app/src/Home.js
+19
-11
19 additions, 11 deletions
theme-costume-app/src/Home.js
theme-costume-app/src/components/Product.js
+16
-0
16 additions, 0 deletions
theme-costume-app/src/components/Product.js
with
35 additions
and
11 deletions
theme-costume-app/src/Home.js
+
19
−
11
View file @
34c7711f
...
...
@@ -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
>
...
...
This diff is collapsed.
Click to expand it.
theme-costume-app/src/components/Product.js
+
16
−
0
View file @
34c7711f
...
...
@@ -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
>
...
...
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