import { translationAtom } from "@/atoms/translations-atom"; import { useAtomValue } from "jotai"; 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); const t = useAtomValue(translationAtom); useEffect(() => { if (ref.current) { ref.current.scrollTop = ref.current.scrollHeight; } }, [logData]); return (

LOGS

{logData.length === 0 && (

{t("APP.INFOS.LOG_AREA.NO_LOGS")}

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

{logLine}

; })}
); }