import { useRef, useEffect } from "react"; import "../../styles/AppealWidget.css"; import { TouchableLayout } from "../TouchableLayout"; import { ReactMarkdownComponent } from "../ReactMarkdown"; function AppealWidget({ widgetImgPath, widgetLabel, widgetText, style, isOpen, }) { const stopProp = (e) => { e.stopPropagation(); e.preventDefault(); }; const layoutRef = useRef(null); useEffect(() => { if (isOpen && layoutRef.current) { const scrollable = layoutRef.current.querySelector(".scrollable"); if (scrollable) scrollable.scrollTop = 0; } }, [isOpen]); return (