Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
exam_12_Tsoy_Danil
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
Цой Данил
exam_12_Tsoy_Danil
Commits
e2fd31d3
Commit
e2fd31d3
authored
Apr 15, 2023
by
Цой Данил
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed sizes of modal window + fixxed bug where user can not properly look his own gallery
parent
bba25780
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
16 deletions
+8
-16
Header.tsx
frontend/src/components/Header/Header.tsx
+1
-14
MainPage.tsx
frontend/src/containers/MainPage/MainPage.tsx
+3
-1
UserGallery.tsx
frontend/src/containers/UserGallery/UserGallery.tsx
+4
-1
No files found.
frontend/src/components/Header/Header.tsx
View file @
e2fd31d3
...
@@ -28,19 +28,6 @@ const Header: React.FunctionComponent = (): React.ReactElement => {
...
@@ -28,19 +28,6 @@ const Header: React.FunctionComponent = (): React.ReactElement => {
dispatch
(
setToInitState
())
dispatch
(
setToInitState
())
}
}
const
handleListKeyDown
=
(
event
:
React
.
KeyboardEvent
):
void
=>
{
if
(
event
.
key
===
'Tab'
)
{
event
.
preventDefault
();
setOpen
(
false
);
}
else
if
(
event
.
key
===
'Escape'
)
{
setOpen
(
false
);
}
}
const
handleToggle
=
():
void
=>
{
setOpen
((
prevOpen
)
=>
!
prevOpen
);
};
const
navigateToPage
=
(
page
:
string
):
void
=>
{
const
navigateToPage
=
(
page
:
string
):
void
=>
{
setOpen
(
false
)
setOpen
(
false
)
navigate
(
`
${
page
}
`
)
navigate
(
`
${
page
}
`
)
...
@@ -59,7 +46,7 @@ const Header: React.FunctionComponent = (): React.ReactElement => {
...
@@ -59,7 +46,7 @@ const Header: React.FunctionComponent = (): React.ReactElement => {
return
(
return
(
<
div
>
<
div
>
<
header
className=
{
styles
.
Header
}
>
<
header
className=
{
styles
.
Header
}
>
<
div
className=
{
styles
.
Header_inner_container
}
>
<
div
className=
{
styles
.
Header_inner_container
}
>
<
div
className=
{
styles
.
LinksBlock
}
>
<
div
className=
{
styles
.
LinksBlock
}
>
<
NavLink
to=
{
'/'
}
>
<
NavLink
to=
{
'/'
}
>
...
...
frontend/src/containers/MainPage/MainPage.tsx
View file @
e2fd31d3
...
@@ -20,11 +20,13 @@ const modalStyles = {
...
@@ -20,11 +20,13 @@ const modalStyles = {
top
:
'50%'
,
top
:
'50%'
,
left
:
'50%'
,
left
:
'50%'
,
transform
:
'translate(-50%, -50%)'
,
transform
:
'translate(-50%, -50%)'
,
width
:
700
,
maxWidth
:
1000
,
width
:
'100%'
,
bgcolor
:
'background.paper'
,
bgcolor
:
'background.paper'
,
border
:
'2px solid #000'
,
border
:
'2px solid #000'
,
boxShadow
:
24
,
boxShadow
:
24
,
p
:
1
,
p
:
1
,
borderRadius
:
'5px'
};
};
const
MainPage
:
React
.
FunctionComponent
=
():
React
.
ReactElement
=>
{
const
MainPage
:
React
.
FunctionComponent
=
():
React
.
ReactElement
=>
{
...
...
frontend/src/containers/UserGallery/UserGallery.tsx
View file @
e2fd31d3
...
@@ -20,11 +20,13 @@ const modalStyles = {
...
@@ -20,11 +20,13 @@ const modalStyles = {
top
:
'50%'
,
top
:
'50%'
,
left
:
'50%'
,
left
:
'50%'
,
transform
:
'translate(-50%, -50%)'
,
transform
:
'translate(-50%, -50%)'
,
width
:
700
,
maxWidth
:
1000
,
width
:
'100%'
,
bgcolor
:
'background.paper'
,
bgcolor
:
'background.paper'
,
border
:
'2px solid #000'
,
border
:
'2px solid #000'
,
boxShadow
:
24
,
boxShadow
:
24
,
p
:
1
,
p
:
1
,
borderRadius
:
'5px'
};
};
export
const
UserGallery
:
React
.
FunctionComponent
=
():
React
.
ReactElement
=>
{
export
const
UserGallery
:
React
.
FunctionComponent
=
():
React
.
ReactElement
=>
{
...
@@ -60,6 +62,7 @@ export const UserGallery: React.FunctionComponent = (): React.ReactElement => {
...
@@ -60,6 +62,7 @@ export const UserGallery: React.FunctionComponent = (): React.ReactElement => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
params
.
id
)
dispatch
(
getPhotosByUserId
(
params
.
id
))
if
(
params
.
id
)
dispatch
(
getPhotosByUserId
(
params
.
id
))
if
(
params
.
id
&&
params
.
id
===
user
?.
_id
)
dispatch
(
setTargetedUser
(
user
))
},
[])
},
[])
return
(
return
(
...
...
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