From 434a27d90d5b91a4f5cc3514c0528a342f48316c Mon Sep 17 00:00:00 2001 From: Matthew Ellison Date: Thu, 26 Feb 2026 21:18:37 -0500 Subject: [PATCH] Fix sonarqube issues --- lib/component/loading/various/Wifi.tsx | 5 +- src/routes/buttons/index.tsx | 4 +- src/routes/modal/index.tsx | 8 +- src/routes/progress/index.tsx | 6 +- src/util/InputUtils.tsx | 105 +++++++------------------ src/util/LoadingUtils.tsx | 4 +- 6 files changed, 41 insertions(+), 91 deletions(-) diff --git a/lib/component/loading/various/Wifi.tsx b/lib/component/loading/various/Wifi.tsx index c1de083..347c0c4 100644 --- a/lib/component/loading/various/Wifi.tsx +++ b/lib/component/loading/various/Wifi.tsx @@ -1,4 +1,5 @@ import type { LoadingWifiProps } from "$/types/LoadingTypes"; +import { useId } from "react"; export default function Wifi({ @@ -9,9 +10,9 @@ export default function Wifi({ fadeDuration = 0.001, stroke, fill -}: LoadingWifiProps){ +}: Readonly){ //https://github.com/n3r4zzurr0/svg-spinners/blob/main/svg-smil/wifi.svg - const id = crypto.randomUUID().replaceAll("-", ""); + const id = useId(); return ( diff --git a/src/routes/buttons/index.tsx b/src/routes/buttons/index.tsx index c433398..7e0cf4e 100644 --- a/src/routes/buttons/index.tsx +++ b/src/routes/buttons/index.tsx @@ -120,10 +120,10 @@ function generateTabContent(Fn: (props: ButtonProps) => JSX.Element, onClick: () function ButtonDisplay({ title, children -}:{ +}: Readonly<{ title: React.ReactNode; children: React.ReactNode; -}){ +}>){ return (
void; -}){ +}>){ return ( void; -}){ +}>){ return ( ){ return (

- + - - + +