Fix word-break in log view

Remove unused useUpdateEffect
This commit is contained in:
grimsi
2024-09-21 15:52:32 +02:00
parent 9219b6747a
commit 69a32fb4f4
2 changed files with 1 additions and 14 deletions
@@ -71,7 +71,7 @@ function LogManagementLayout({getConfig, formik}: any) {
<Divider className="mb-4"/>
</div>
<Code size="sm" radius="none"
className={`flex flex-col h-[50vh] max-h-[50vh] text-sm overflow-auto ${softWrap ? "whitespace-normal" : "whitespace-nowrap"}`}>
className={`flex flex-col h-[50vh] max-h-[50vh] text-sm overflow-auto ${softWrap ? "whitespace-normal break-words" : "whitespace-nowrap"}`}>
{logEntries.map((entry, index) => <p key={index}>{entry}</p>)}
<div ref={logEndRef}/>
</Code>
@@ -1,13 +0,0 @@
import {useEffect, useRef} from "react";
export default function useUpdateEffect(effect: Function, dependencies?: [any]) {
const isInitialMount = useRef(true);
useEffect(() => {
if (isInitialMount.current) {
isInitialMount.current = false;
} else {
return effect();
}
}, dependencies);
}