diff --git a/src/components/main/Message.jsx b/src/components/main/Message.jsx
index f02b71e8b3..4c20a6dcab 100644
--- a/src/components/main/Message.jsx
+++ b/src/components/main/Message.jsx
@@ -2,7 +2,6 @@ import React, { useEffect } from 'react';
import { useSelector } from 'react-redux';
import GPTIcon from '../svg/GPTIcon';
import BingIcon from '../svg/BingIcon';
-// import useCustomEffect from '~/hooks/useCustomEffect';
export default function Message({
sender,
@@ -18,7 +17,7 @@ export default function Message({
if (blinker) {
scrollToBottom();
}
- }, [isSubmitting, text]);
+ }, [isSubmitting, text, blinker, scrollToBottom]);
const props = {
className:
@@ -52,7 +51,7 @@ export default function Message({
- {!!error ? (
+ {error ? (
{text}
diff --git a/src/components/main/Messages.jsx b/src/components/main/Messages.jsx
index 040d7d0e92..673fb2c42e 100644
--- a/src/components/main/Messages.jsx
+++ b/src/components/main/Messages.jsx
@@ -63,7 +63,7 @@ const Messages = ({ messages }) => {
sender={message.sender}
text={message.text}
last={i === messages.length - 1}
- error={!!message.error ? true : false}
+ error={message.error ? true : false}
scrollToBottom={i === messages.length - 1 ? scrollToBottom : null}
/>
))}
@@ -74,7 +74,7 @@ const Messages = ({ messages }) => {
unmountOnExit={false}
// appear
>
- {(state) => showScrollButton &&
}
+ {() => showScrollButton &&
}
state.submit);
diff --git a/src/components/main/TextChat.jsx b/src/components/main/TextChat.jsx
index 9dd47259cf..53ed0e2f29 100644
--- a/src/components/main/TextChat.jsx
+++ b/src/components/main/TextChat.jsx
@@ -20,7 +20,7 @@ export default function TextChat({ messages }) {
const { error } = convo;
const submitMessage = () => {
- if (!!error) {
+ if (error) {
dispatch(setError(false));
}
@@ -116,7 +116,7 @@ export default function TextChat({ messages }) {
}
if (e.key === 'Enter' && !e.shiftKey) {
- if (!!isSubmitting) {
+ if (isSubmitting) {
return;
}
@@ -142,7 +142,7 @@ export default function TextChat({ messages }) {