Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
classwork-55
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Нұрасыл Қайратұлы
classwork-55
Commits
e438efa6
Commit
e438efa6
authored
May 14, 2024
by
Nurasyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8f61cc6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
24 deletions
+1
-24
App.tsx
src/App.tsx
+1
-3
Context.tsx
src/containers/Context.tsx
+0
-21
No files found.
src/App.tsx
View file @
e438efa6
...
...
@@ -6,7 +6,6 @@ import { NotFound } from './components/NotFound/NotFound';
import
{
ContactData
}
from
'./containers/ContactData/ContactData'
;
import
{
Layout
}
from
'./components/Layout/Layout'
;
import
{
Orders
}
from
'./containers/Orders/Orders'
;
import
{
Context
}
from
'./containers/Context'
;
function
App
()
{
return
(
...
...
@@ -14,8 +13,7 @@ function App() {
<
Routes
>
<
Route
path=
'/'
element=
{
<
Layout
/>
}
>
<
Route
index
element=
{
<
BurgerBuilder
/>
}
/>
<
Route
path=
'/orders'
element=
{
<
Context
/>
}
/>
<
Route
path=
'/order'
element=
{
<
Context
/>
}
/>
<
Route
path=
'/orders'
element=
{
<
Orders
/>
}
/>
<
Route
path=
'/checkout'
element=
{
<
Checkout
/>
}
>
<
Route
path=
'contactData'
element=
{
<
ContactData
/>
}
/>
</
Route
>
...
...
src/containers/Context.tsx
deleted
100644 → 0
View file @
8f61cc6a
import
React
,
{
useEffect
}
from
"react"
;
import
{
useLocation
}
from
"react-router-dom"
;
export
const
Context
=
()
=>
{
const
location
=
useLocation
();
useEffect
(()
=>
{
console
.
log
(
location
,
'location'
);
},
[]);
return
(
location
.
pathname
===
"/order"
?
<
div
>
Order Page
</
div
>
:
<
div
>
Orders Page
</
div
>
);
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment