add more ui logs and fix sonarqube lint

This commit is contained in:
Eduard Gert
2026-06-16 13:45:54 +02:00
parent b16bdf5e8f
commit 192c3109c0
10 changed files with 147 additions and 90 deletions
@@ -50,7 +50,8 @@ export const CopyToClipboard = ({
setCopied(true);
if (copyTimer.current) clearTimeout(copyTimer.current);
copyTimer.current = setTimeout(() => setCopied(false), 500);
} catch {
} catch (e) {
console.warn("copy to clipboard failed", e);
}
};
@@ -31,7 +31,7 @@ export function LanguagePicker() {
.then((list) => {
if (!cancelled) setLanguages(list);
})
.catch(() => {});
.catch((err: unknown) => console.error("load languages failed", err));
return () => {
cancelled = true;
};
@@ -163,7 +163,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button
if (copyTimer.current) clearTimeout(copyTimer.current);
copyTimer.current = setTimeout(() => setCopied(false), 1500);
})
.catch(() => {});
.catch((e: unknown) => console.warn("copy to clipboard failed", e));
}
onClick?.(e);
}}
@@ -279,7 +279,8 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
setCopied(true);
if (copyTimer.current) clearTimeout(copyTimer.current);
copyTimer.current = setTimeout(() => setCopied(false), 1500);
} catch {
} catch (e) {
console.warn("copy to clipboard failed", e);
}
};