Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-06-11 16:16:21 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3e6c253cd0971e88b2a6387509f6d6d819d72dc8
3e6c253c
1 parent
8803269b
add empty array in useEffect
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
front/src/Routes/Chat/ChatPresenter.js
front/src/Routes/Chat/ChatPresenter.js
View file @
3e6c253
...
...
@@ -156,7 +156,7 @@ export default ({
})
=>
{
const
{
pathname
}
=
location
;
const
roomName
=
pathname
.
slice
(
1
,
pathname
.
length
);
useEffect
(()
=>
subscribeToNewMessage
());
useEffect
(()
=>
subscribeToNewMessage
()
,
[]
);
return
(
<
Wrapper
>
...
...
@@ -176,10 +176,9 @@ export default ({
<
/ChatMenuContainer
>
<
ChatScreenContainer
>
<
ChatScreenHeader
>
<
Title
>
Selected
Menu
Title
<
/Title
>
<
Title
>
{
roomName
}
<
/Title
>
<
/ChatScreenHeader
>
<
ChatScreenBox
>
<
ul
>
{
messageArray
&&
messageArray
.
seeAllMessage
.
map
((
e
)
=>
(
<
Message
...
...
@@ -189,7 +188,6 @@ export default ({
avatar
=
{
e
.
sender
.
avatarUrl
}
/
>
))}
<
/ul
>
<
InputContainer
className
=
"InputContainer"
>
<
form
onSubmit
=
{
onSubmit
}
>
<
Input
...
...
Please
register
or
login
to post a comment