()
| 50 | |
| 51 | // Function to adjust the height of the textarea |
| 52 | const adjustTextareaHeight = () => { |
| 53 | if (textareaRef.current) { |
| 54 | textareaRef.current.style.height = 'auto'; // Reset the height |
| 55 | textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`; // Set the height based on scroll height |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | useEffect(() => { |
| 60 | if (!isCommentValid() || isLoading) { |