style: auto-fix lint and format

This commit is contained in:
ajnart authored and github-actions[bot] committed 2026-06-15 14:58:56 +00:00
1 parent 4a65d2ae87
commit 7ffb90abd2
1 file changed
+42 -40
+42 -40
View File
@@ -51,47 +51,49 @@ type BeszelAreaChartProps = Omit<AreaChartProps, "dataKey" | "curveType" | "with
yAxisDomain?: [number, string]; yAxisDomain?: [number, string];
}; };
const BeszelAreaChart = memo(({ const BeszelAreaChart = memo(
yAxisFormatter, ({
yAxisDomain, yAxisFormatter,
yAxisProps: yAxisPropsOverride, yAxisDomain,
type = "default", yAxisProps: yAxisPropsOverride,
...props type = "default",
}: BeszelAreaChartProps) => { ...props
const mergedYAxis = useMemo( }: BeszelAreaChartProps) => {
() => ({ const mergedYAxis = useMemo(
...yAxisBase, () => ({
width: 48, ...yAxisBase,
tickMargin: 2, width: 48,
...(yAxisDomain ? { domain: yAxisDomain } : {}), tickMargin: 2,
tickFormatter: yAxisFormatter, ...(yAxisDomain ? { domain: yAxisDomain } : {}),
...yAxisPropsOverride, tickFormatter: yAxisFormatter,
}), ...yAxisPropsOverride,
[yAxisFormatter, yAxisDomain, yAxisPropsOverride], }),
); [yAxisFormatter, yAxisDomain, yAxisPropsOverride],
);
return ( return (
<AreaChart <AreaChart
dataKey="time" dataKey="time"
curveType="monotone" curveType="monotone"
withGradient={false} withGradient={false}
connectNulls connectNulls
withDots={false} withDots={false}
type={type} type={type}
strokeWidth={1} strokeWidth={1}
fillOpacity={0.2} fillOpacity={0.2}
areaChartProps={{ areaChartProps={{
// margin: { top: 0, right: 0, bottom: 0, left: 10 }, // margin: { top: 0, right: 0, bottom: 0, left: 10 },
}} }}
withXAxis withXAxis
withYAxis withYAxis
w="100%" w="100%"
style={chartStyle} style={chartStyle}
yAxisProps={mergedYAxis} yAxisProps={mergedYAxis}
{...props} {...props}
/> />
); );
}); },
);
export const useSystemChartData = ( export const useSystemChartData = (
systemStats: BeszelSystemStatsRecord[] | undefined, systemStats: BeszelSystemStatsRecord[] | undefined,