From d289daf6ca046b17ec1a8f4136a15eb579f15dc4 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 10 Jun 2025 16:29:33 +0530 Subject: [PATCH] refactor: component cleanup --- .../src/components/ChatwootConversation.jsx | 19 +++++++++++-------- .../ChatwootMessageListWebComponent.vue | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/javascript/react-components/src/components/ChatwootConversation.jsx b/app/javascript/react-components/src/components/ChatwootConversation.jsx index 6af23cfc1..29717f710 100644 --- a/app/javascript/react-components/src/components/ChatwootConversation.jsx +++ b/app/javascript/react-components/src/components/ChatwootConversation.jsx @@ -13,8 +13,8 @@ export const ChatwootConversation = ({ // Ensure we're inside a ChatwootProvider useChatwoot(); // This will throw if not in Provider context - const [isLoaded, setIsLoaded] = useState(false); - const [error, setError] = useState(null); + const [, setIsLoaded] = useState(false); + const [, setError] = useState(null); // Validate required props if (!conversationId) { @@ -27,11 +27,14 @@ export const ChatwootConversation = ({ onLoad?.(); }, [onLoad]); - const handleError = useCallback((err) => { - setError(err.message); - setIsLoaded(false); - onError?.(err); - }, [onError]); + const handleError = useCallback( + err => { + setError(err.message); + setIsLoaded(false); + onError?.(err); + }, + [onError] + ); return (