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
863a1e70
Commit
863a1e70
authored
1 year ago
by
Tiago Brito
Browse files
Options
Downloads
Patches
Plain Diff
Implemented App.js
parent
b41955ac
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/App.js
+29
-15
29 additions, 15 deletions
frontend/src/App.js
with
29 additions
and
15 deletions
frontend/src/App.js
+
29
−
15
View file @
863a1e70
import
React
from
'
react
'
;
import
{
BrowserRouter
as
Router
,
Routes
,
Route
}
from
'
react-router-dom
'
;
import
Home
from
'
./components/Home
'
;
import
Products
from
'
./components/Products
'
;
import
Orders
from
'
./components/Orders
'
;
import
{
CartProvider
}
from
'
./contexts/CartContext
'
;
import
Header
from
'
./components/Header
'
;
import
Footer
from
'
./components/Footer
'
;
import
Home
from
'
./components/Home
'
;
import
ProductDetails
from
'
./components/ProductDetails
'
;
import
CategoryProducts
from
'
./components/CategoryProducts
'
;
import
Cart
from
'
./components/Cart
'
;
import
SignIn
from
'
./components/SignIn
'
;
import
NotFound
from
'
./components/NotFound
'
;
import
SearchResults
from
'
./components/SearchResults
'
;
function
App
()
{
return
(
<
Router
>
<
Header
/>
<
Routes
>
<
Route
path
=
"
/
"
element
=
{
<
Home
/>
}
/
>
<
Route
path
=
"
/products
"
element
=
{
<
Products
/>
}
/
>
<
Route
path
=
"
/orders
"
element
=
{
<
Orders
/>
}
/
>
<
/Routes
>
<
Footer
/>
<
/Router
>
);
return
(
<
CartProvider
>
<
Router
>
<
div
className
=
"
App
"
>
<
Header
/>
<
Routes
>
<
Route
path
=
"
/
"
element
=
{
<
Home
/>
}
/
>
<
Route
path
=
"
/search
"
element
=
{
<
SearchResults
/>
}
/
>
<
Route
path
=
"
/product/:productId
"
element
=
{
<
ProductDetails
/>
}
/
>
<
Route
path
=
"
/category/:categoryName
"
element
=
{
<
CategoryProducts
/>
}
/
>
<
Route
path
=
"
/cart
"
element
=
{
<
Cart
/>
}
/
>
<
Route
path
=
"
/signin
"
element
=
{
<
SignIn
/>
}
/
>
<
Route
path
=
"
*
"
element
=
{
<
NotFound
/>
}
/
>
<
/Routes
>
<
Footer
/>
<
/div
>
<
/Router
>
<
/CartProvider
>
);
}
export
default
App
;
\ No newline at end of file
export
default
App
;
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