Jon/sky 5868 max recursion error in app (#3167)

This commit is contained in:
Jonathan Dobson
2025-08-12 15:34:41 -04:00
committed by GitHub
parent 039fce0bb3
commit 48ccd5fd72
2 changed files with 11 additions and 16 deletions

View File

@@ -1,12 +1,6 @@
import { Textarea } from "@/components/ui/textarea";
import type { ChangeEventHandler, HTMLAttributes } from "react";
import {
forwardRef,
useEffect,
useLayoutEffect,
useRef,
useCallback,
} from "react";
import { forwardRef, useEffect, useRef, useCallback } from "react";
import { cn } from "@/util/utils";
type Props = {
@@ -49,14 +43,6 @@ const AutoResizingTextarea = forwardRef<HTMLTextAreaElement, Props>(
}
};
useLayoutEffect(() => {
const textareaElement = getTextarea();
if (!textareaElement) {
return;
}
textareaElement.style.height = `${textareaElement.scrollHeight + 2}px`;
}, [getTextarea]);
useEffect(() => {
const textareaElement = getTextarea();
if (!textareaElement) {