From 4d18e64f17b74106ae094d0293ec08effe62f06e Mon Sep 17 00:00:00 2001 From: KlausMikhaelson Date: Wed, 17 Jan 2024 02:17:20 -0600 Subject: [PATCH 1/2] fixed button and chatviewlist warning --- src/components/chat/w2wChat/chatBox/ChatBox.tsx | 1 + src/components/dropdowns/DropdownBtnHandler.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/chat/w2wChat/chatBox/ChatBox.tsx b/src/components/chat/w2wChat/chatBox/ChatBox.tsx index e18f74f069..c97832a6c2 100644 --- a/src/components/chat/w2wChat/chatBox/ChatBox.tsx +++ b/src/components/chat/w2wChat/chatBox/ChatBox.tsx @@ -275,6 +275,7 @@ const ChatBox = ({ showGroupInfoModal }): JSX.Element => { {(!!currentChat || !!Object.keys(currentChat || {}).length) && ( diff --git a/src/components/dropdowns/DropdownBtnHandler.tsx b/src/components/dropdowns/DropdownBtnHandler.tsx index 0841041295..b8143057f9 100644 --- a/src/components/dropdowns/DropdownBtnHandler.tsx +++ b/src/components/dropdowns/DropdownBtnHandler.tsx @@ -45,7 +45,7 @@ export const DropdownBtnHandler: React.FC = ({ ); }; -const Container = styled.button` +const Container = styled.span` position:relative; margin: 0; padding: 0; From fb696cdf18cc2d2608f01e5b454d47b9a294958c Mon Sep 17 00:00:00 2001 From: KlausMikhaelson Date: Wed, 17 Jan 2024 02:27:22 -0600 Subject: [PATCH 2/2] fixed memory leak in useeffect --- src/sections/yield/YieldStatsSection.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sections/yield/YieldStatsSection.tsx b/src/sections/yield/YieldStatsSection.tsx index 82e689232e..d75e8c43e5 100644 --- a/src/sections/yield/YieldStatsSection.tsx +++ b/src/sections/yield/YieldStatsSection.tsx @@ -59,9 +59,11 @@ const YieldStatsSection = ({ }; React.useEffect(() => { - setTimeout(() => { + const timeout = setTimeout(() => { getFormattedDuration(); }, 1000); + + return () => clearTimeout(timeout); });