style: format frontend with prettier

Mechanical one-shot pass of pnpm format over src/, tests/, tools/, and
root configs. No functional changes; build and type-check verified.
This commit is contained in:
2026-07-04 20:23:32 +01:00
parent 32c6ae09d6
commit 827e1a8ecf
152 changed files with 9204 additions and 7445 deletions
+16 -16
View File
@@ -1,34 +1,34 @@
import { useLayoutEffect, useRef, useState } from "react";
import { Tooltip } from "../Tooltip";
import { useLayoutEffect, useRef, useState } from 'react'
import { Tooltip } from '../Tooltip'
export function TruncatedFilename({ filename }: { filename: string }) {
const textRef = useRef<HTMLParagraphElement>(null);
const [isTruncated, setIsTruncated] = useState(false);
const textRef = useRef<HTMLParagraphElement>(null)
const [isTruncated, setIsTruncated] = useState(false)
useLayoutEffect(() => {
const text = textRef.current;
if (!text) return;
const text = textRef.current
if (!text) return
const update = () => {
setIsTruncated(text.scrollWidth > text.clientWidth);
};
setIsTruncated(text.scrollWidth > text.clientWidth)
}
update();
update()
const observer = new ResizeObserver(update);
observer.observe(text);
return () => observer.disconnect();
}, [filename]);
const observer = new ResizeObserver(update)
observer.observe(text)
return () => observer.disconnect()
}, [filename])
const label = (
<p ref={textRef} className="truncate text-[12px] font-medium leading-tight text-white">
<p ref={textRef} className="truncate text-[12px] leading-tight font-medium text-white">
{filename}
</p>
);
)
return (
<Tooltip label={filename} delay={500} block followCursor disabled={!isTruncated}>
{label}
</Tooltip>
);
)
}