Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
Full-Stack
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
1
Merge Requests
1
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
Нұрасыл Қайратұлы
Full-Stack
Commits
4fafab66
Commit
4fafab66
authored
Jul 16, 2024
by
Nurasyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил компоненты
parent
c97e2e91
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
6 deletions
+49
-6
App.tsx
Frontend/src/App.tsx
+24
-6
Products.tsx
Frontend/src/containers/Products/Products.tsx
+20
-0
axiosApiClient.ts
Frontend/src/helpers/axiosApiClient.ts
+5
-0
No files found.
Frontend/src/App.tsx
View file @
4fafab66
const
App
=
()
=>
(
import
{
Container
,
CssBaseline
}
from
'@mui/material'
;
import
{
Route
,
Routes
}
from
'react-router-dom'
;
import
{
AppToolbar
}
from
'./components/UI/AppToolbar/AppToolbar'
;
import
{
Products
}
from
'./containers/Products/Products'
;
function
App
()
{
return
(
<>
<
header
>
Navbar will go here
</
header
>
<
main
>
Main content will go here
</
main
>
<
CssBaseline
/>
<
header
>
<
AppToolbar
/>
</
header
>
<
main
>
<
Container
maxWidth=
"xl"
sx=
{
{
mt
:
10
}
}
>
<
Routes
>
<
Route
path=
"/"
element=
{
<
Products
/>
}
/>
</
Routes
>
</
Container
>
</
main
>
</>
);
);
}
export
default
App
;
Frontend/src/containers/Products/Products.tsx
0 → 100644
View file @
4fafab66
import
{
Link
}
from
'react-router-dom'
;
import
{
Typography
,
Grid
,
Button
}
from
'@mui/material'
;
export
function
Products
()
{
return
(
<
Grid
container
direction=
"column"
spacing=
{
2
}
>
<
Grid
item
container
direction=
"row"
justifyContent=
"space-between"
alignItems=
"center"
>
<
Grid
item
>
<
Typography
variant=
"h4"
>
Products
</
Typography
>
</
Grid
>
<
Grid
item
>
<
Button
color=
"primary"
component=
{
Link
}
to=
{
'/products/new'
}
>
Add product
</
Button
>
</
Grid
>
</
Grid
>
</
Grid
>
);
}
Frontend/src/helpers/axiosApiClient.ts
0 → 100644
View file @
4fafab66
import
axios
from
"axios"
;
export
const
axiosApiClient
=
axios
.
create
({
baseURL
:
"http://localhost:8000"
});
\ 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