Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
web-system-2-final-project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lirong xu
web-system-2-final-project
Commits
37c360d4
Commit
37c360d4
authored
1 year ago
by
xulirong2000
Browse files
Options
Downloads
Patches
Plain Diff
finish
parent
1cfbe8ec
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/App.js
+3
-3
3 additions, 3 deletions
src/App.js
with
3 additions
and
3 deletions
src/App.js
+
3
−
3
View file @
37c360d4
import
React
,
{
useState
}
from
"
react
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
"
./App.css
"
;
import
"
./App.css
"
;
import
{
BrowserRouter
as
Router
,
Routes
,
Route
}
from
"
react-router-dom
"
;
import
{
BrowserRouter
,
Routes
,
Route
}
from
"
react-router-dom
"
;
import
{
Navbar
}
from
"
./components/navbar
"
;
import
{
Navbar
}
from
"
./components/navbar
"
;
import
{
Shop
}
from
"
./pages/shop/shop
"
;
import
{
Shop
}
from
"
./pages/shop/shop
"
;
import
{
Contact
}
from
"
./pages/contact/contact
"
;
import
{
Contact
}
from
"
./pages/contact/contact
"
;
...
@@ -15,7 +15,7 @@ function App() {
...
@@ -15,7 +15,7 @@ function App() {
return
(
return
(
<
div
className
=
"
App
"
>
<
div
className
=
"
App
"
>
<
ShopContextProvider
>
<
ShopContextProvider
>
<
Router
>
<
BrowserRouter
basename
=
{
window
.
location
.
pathname
}
>
<
Navbar
user
=
{
user
}
setUser
=
{
setUser
}
/
>
<
Navbar
user
=
{
user
}
setUser
=
{
setUser
}
/
>
<
Routes
>
<
Routes
>
<
Route
path
=
"
/
"
element
=
{
<
Shop
user
=
{
user
}
/>} /
>
<
Route
path
=
"
/
"
element
=
{
<
Shop
user
=
{
user
}
/>} /
>
...
@@ -24,7 +24,7 @@ function App() {
...
@@ -24,7 +24,7 @@ function App() {
<
Route
path
=
"
/cart
"
element
=
{
<
Cart
/>
}
/
>
<
Route
path
=
"
/cart
"
element
=
{
<
Cart
/>
}
/
>
<
Route
path
=
"
/login
"
element
=
{
<
Login
setUser
=
{
setUser
}
/>} /
>
<
Route
path
=
"
/login
"
element
=
{
<
Login
setUser
=
{
setUser
}
/>} /
>
<
/Routes
>
<
/Routes
>
<
/Router
>
<
/
Browser
Router
>
<
/ShopContextProvider
>
<
/ShopContextProvider
>
<
/div
>
<
/div
>
);
);
...
...
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