Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
Homework83_M11
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
Ли Джен Сеп
Homework83_M11
Commits
28105f5b
Commit
28105f5b
authored
Dec 20, 2024
by
bekzat kapan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#7
Обернул не главную компоненту, а layout, так как иначе вызывает ошибки
parent
ad612b98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
layout.tsx
frontend/src/app/layout.tsx
+8
-5
page.tsx
frontend/src/app/page.tsx
+1
-4
No files found.
frontend/src/app/layout.tsx
View file @
28105f5b
"use client"
;
import
{
store
}
from
"@/store/store"
;
import
{
Provider
}
from
"react-redux"
;
export
default
function
RootLayout
({
export
default
function
RootLayout
({
children
,
children
,
...
@@ -5,10 +8,10 @@ export default function RootLayout({
...
@@ -5,10 +8,10 @@ export default function RootLayout({
children
:
React
.
ReactNode
;
children
:
React
.
ReactNode
;
}
>
)
{
}
>
)
{
return
(
return
(
<
html
lang=
"en"
>
<
Provider
store=
{
store
}
>
<
body
>
<
html
lang=
"en"
>
{
children
}
<
body
>
{
children
}
</
body
>
</
body
>
</
html
>
</
html
>
</
Provider
>
);
);
}
}
frontend/src/app/page.tsx
View file @
28105f5b
...
@@ -5,8 +5,6 @@ import { ChangeEvent, useEffect, useState } from 'react';
...
@@ -5,8 +5,6 @@ import { ChangeEvent, useEffect, useState } from 'react';
import
InputField
from
'./components/InputField'
;
import
InputField
from
'./components/InputField'
;
import
'@/animations/Loader.css'
;
import
'@/animations/Loader.css'
;
import
{
useAppDispatch
,
useAppSelector
}
from
'@/store/hooks'
;
import
{
useAppDispatch
,
useAppSelector
}
from
'@/store/hooks'
;
import
{
Provider
}
from
'react-redux'
;
import
{
store
}
from
'@/store/store'
;
import
{
encodeMessage
,
decodeMessage
}
from
'@/features/requestSlice'
;
import
{
encodeMessage
,
decodeMessage
}
from
'@/features/requestSlice'
;
interface
IFormData
{
interface
IFormData
{
...
@@ -72,7 +70,7 @@ export default function Home() {
...
@@ -72,7 +70,7 @@ export default function Home() {
};
};
return
(
return
(
<
Provider
store=
{
store
}
>
<
div
className=
"App"
>
<
div
className=
"App"
>
<
Container
sx=
{
{
marginTop
:
2
}
}
maxWidth=
"lg"
>
<
Container
sx=
{
{
marginTop
:
2
}
}
maxWidth=
"lg"
>
<
Typography
<
Typography
...
@@ -181,6 +179,5 @@ export default function Home() {
...
@@ -181,6 +179,5 @@ export default function Home() {
{
error
&&
<
Typography
color=
"error"
>
{
error
}
</
Typography
>
}
{
error
&&
<
Typography
color=
"error"
>
{
error
}
</
Typography
>
}
</
Container
>
</
Container
>
</
div
>
</
div
>
</
Provider
>
);
);
}
}
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