import React, { useEffect } from "react"; type LogAreaProps = { copyOnClickHandler: () => void; isCopied: boolean; logData: string[]; }; export function LogArea({ copyOnClickHandler, isCopied, logData, }: LogAreaProps) { const ref = React.useRef(null); useEffect(() => { if (ref.current) { ref.current.scrollTop = ref.current.scrollHeight; } }, [logData]); return (

LOGS

{logData.length === 0 && (

No logs to show

)} {logData.map((logLine: any) => { return

{logLine}

; })}
); }