import { t } from "@/utils"; import { useEffect, useRef, useState } from "react"; import { LiaUserEditSolid } from "react-icons/lia"; const AdEditedByAdmin = ({ admin_edit_reason }) => { const textRef = useRef(null); const [isTextOverflowing, setIsTextOverflowing] = useState(false); const [isExpanded, setIsExpanded] = useState(false); useEffect(() => { const checkTextOverflow = () => { if (textRef.current && !isExpanded) { const element = textRef.current; const isOverflowing = element.scrollHeight > element.clientHeight; setIsTextOverflowing(isOverflowing); } }; checkTextOverflow(); window.addEventListener("resize", checkTextOverflow); return () => window.removeEventListener("resize", checkTextOverflow); }, [isExpanded]); return (
{admin_edit_reason}