fix sonar warnings

This commit is contained in:
Athou
2025-07-29 15:21:15 +02:00
parent 31e385fbfb
commit c3d4831550
69 changed files with 177 additions and 91 deletions

View File

@@ -1,10 +1,10 @@
import { NumberFormatter } from "@mantine/core"
import type { MetricGauge } from "@/app/types"
interface MeterProps {
interface GaugeProps {
gauge: MetricGauge
}
export function Gauge(props: MeterProps) {
export function Gauge(props: Readonly<GaugeProps>) {
return <NumberFormatter value={props.gauge.value} thousandSeparator />
}

View File

@@ -5,7 +5,7 @@ interface MeterProps {
meter: MetricMeter
}
export function Meter(props: MeterProps) {
export function Meter(props: Readonly<MeterProps>) {
return (
<Box>
<Box>Mean: {props.meter.mean_rate.toFixed(2)}</Box>

View File

@@ -7,7 +7,7 @@ interface MetricAccordionItemProps {
children: React.ReactNode
}
export function MetricAccordionItem({ metricKey, name, headerValue, children }: MetricAccordionItemProps) {
export function MetricAccordionItem({ metricKey, name, headerValue, children }: Readonly<MetricAccordionItemProps>) {
return (
<Accordion.Item value={metricKey} key={metricKey}>
<Accordion.Control>

View File

@@ -5,7 +5,7 @@ interface MetricTimerProps {
timer: MetricTimer
}
export function Timer(props: MetricTimerProps) {
export function Timer(props: Readonly<MetricTimerProps>) {
return (
<Box>
<Box>Mean: {props.timer.mean_rate.toFixed(2)}</Box>