sdy

add empty array in useEffect

......@@ -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
......