Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Database_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Phrot Vedal
Database_project
Commits
71bd386c
Commit
71bd386c
authored
1 year ago
by
Tiago Brito
Browse files
Options
Downloads
Patches
Plain Diff
Implemented Home.js
parent
3b3b7aa0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/components/Home.js
+24
-4
24 additions, 4 deletions
frontend/src/components/Home.js
with
24 additions
and
4 deletions
frontend/src/components/Home.js
+
24
−
4
View file @
71bd386c
// Home.js
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
Carousel
from
'
./Carousel
'
;
import
FeaturedProducts
from
'
./FeaturedProducts
'
;
import
Navigation
from
'
./Navigation
'
;
import
'
../css/Home.css
'
// Sample data for Carousel and FeaturedProducts
const
sampleBanners
=
[
{
id
:
1
,
image
:
'
/images/essentials_for_gamers.jpg
'
,
title
:
'
Banner 1
'
},
{
id
:
2
,
image
:
'
/images/gifts_to_make_mom_smile.jpg
'
,
title
:
'
Banner 2
'
}
];
const
sampleProducts
=
[
{
id
:
1
,
name
:
'
Headsets
'
,
price
:
99.99
,
image
:
'
/images/featured_products/headsets.png
'
},
{
id
:
2
,
name
:
'
Gaming mice
'
,
price
:
199.99
,
image
:
'
/images/featured_products/gaming_mice.png
'
},
{
id
:
3
,
name
:
'
Laptops
'
,
price
:
199.99
,
image
:
'
/images/featured_products/laptops.png
'
},
{
id
:
4
,
name
:
'
Keyboards
'
,
price
:
199.99
,
image
:
'
/images/featured_products/keyboards.png
'
},
{
id
:
5
,
name
:
'
Chairs
'
,
price
:
199.99
,
image
:
'
/images/featured_products/chairs.png
'
}
];
function
Home
()
{
function
Home
()
{
return
(
return
(
<
div
>
<
div
className
=
"
home-page
"
>
<
h1
>
Welcome
to
ElectroMart
<
/h1
>
<
Navigation
/>
<
p
>
Find
the
best
electronics
at
unbeatable
prices
.
<
/p
>
<
Carousel
banners
=
{
sampleBanners
}
/
>
<
FeaturedProducts
title
=
"
Gaming Accessories
"
products
=
{
sampleProducts
}
/
>
<
/div
>
<
/div
>
);
);
}
}
export
default
Home
;
export
default
Home
;
\ 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