Showing
1 changed file
with
2 additions
and
4 deletions
... | @@ -156,7 +156,7 @@ export default ({ | ... | @@ -156,7 +156,7 @@ export default ({ |
156 | }) => { | 156 | }) => { |
157 | const { pathname } = location; | 157 | const { pathname } = location; |
158 | const roomName = pathname.slice(1, pathname.length); | 158 | const roomName = pathname.slice(1, pathname.length); |
159 | - useEffect(() => subscribeToNewMessage()); | 159 | + useEffect(() => subscribeToNewMessage(), []); |
160 | 160 | ||
161 | return ( | 161 | return ( |
162 | <Wrapper> | 162 | <Wrapper> |
... | @@ -176,10 +176,9 @@ export default ({ | ... | @@ -176,10 +176,9 @@ export default ({ |
176 | </ChatMenuContainer> | 176 | </ChatMenuContainer> |
177 | <ChatScreenContainer> | 177 | <ChatScreenContainer> |
178 | <ChatScreenHeader> | 178 | <ChatScreenHeader> |
179 | - <Title>Selected Menu Title</Title> | 179 | + <Title>{roomName}</Title> |
180 | </ChatScreenHeader> | 180 | </ChatScreenHeader> |
181 | <ChatScreenBox> | 181 | <ChatScreenBox> |
182 | - <ul> | ||
183 | {messageArray && | 182 | {messageArray && |
184 | messageArray.seeAllMessage.map((e) => ( | 183 | messageArray.seeAllMessage.map((e) => ( |
185 | <Message | 184 | <Message |
... | @@ -189,7 +188,6 @@ export default ({ | ... | @@ -189,7 +188,6 @@ export default ({ |
189 | avatar={e.sender.avatarUrl} | 188 | avatar={e.sender.avatarUrl} |
190 | /> | 189 | /> |
191 | ))} | 190 | ))} |
192 | - </ul> | ||
193 | <InputContainer className="InputContainer"> | 191 | <InputContainer className="InputContainer"> |
194 | <form onSubmit={onSubmit}> | 192 | <form onSubmit={onSubmit}> |
195 | <Input | 193 | <Input | ... | ... |
-
Please register or login to post a comment