Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

style: auto-fix lint and format

ajnart7ffb90abd2e7
diff --git a/packages/widgets/src/beszel/_shared/chart.tsx b/packages/widgets/src/beszel/_shared/chart.tsx
index 7db7ccd60..331117c81 100644
--- a/packages/widgets/src/beszel/_shared/chart.tsx
+++ b/packages/widgets/src/beszel/_shared/chart.tsx
@@ -51,47 +51,49 @@ type BeszelAreaChartProps = Omit<AreaChartProps, "dataKey" | "curveType" | "with
yAxisDomain?: [number, string];
};
-const BeszelAreaChart = memo(({
- yAxisFormatter,
- yAxisDomain,
- yAxisProps: yAxisPropsOverride,
- type = "default",
- ...props
-}: BeszelAreaChartProps) => {
- const mergedYAxis = useMemo(
- () => ({
- ...yAxisBase,
- width: 48,
- tickMargin: 2,
- ...(yAxisDomain ? { domain: yAxisDomain } : {}),
- tickFormatter: yAxisFormatter,
- ...yAxisPropsOverride,
- }),
- [yAxisFormatter, yAxisDomain, yAxisPropsOverride],
- );
-
- return (
- <AreaChart
- dataKey="time"
- curveType="monotone"
- withGradient={false}
- connectNulls
- withDots={false}
- type={type}
- strokeWidth={1}
- fillOpacity={0.2}
- areaChartProps={{
- // margin: { top: 0, right: 0, bottom: 0, left: 10 },
- }}
- withXAxis
- withYAxis
- w="100%"
- style={chartStyle}
- yAxisProps={mergedYAxis}
- {...props}
- />
- );
-});
+const BeszelAreaChart = memo(
+ ({
+ yAxisFormatter,
+ yAxisDomain,
+ yAxisProps: yAxisPropsOverride,
+ type = "default",
+ ...props
+ }: BeszelAreaChartProps) => {
+ const mergedYAxis = useMemo(
+ () => ({
+ ...yAxisBase,
+ width: 48,
+ tickMargin: 2,
+ ...(yAxisDomain ? { domain: yAxisDomain } : {}),
+ tickFormatter: yAxisFormatter,
+ ...yAxisPropsOverride,
+ }),
+ [yAxisFormatter, yAxisDomain, yAxisPropsOverride],
+ );
+
+ return (
+ <AreaChart
+ dataKey="time"
+ curveType="monotone"
+ withGradient={false}
+ connectNulls
+ withDots={false}
+ type={type}
+ strokeWidth={1}
+ fillOpacity={0.2}
+ areaChartProps={{
+ // margin: { top: 0, right: 0, bottom: 0, left: 10 },
+ }}
+ withXAxis
+ withYAxis
+ w="100%"
+ style={chartStyle}
+ yAxisProps={mergedYAxis}
+ {...props}
+ />
+ );
+ },
+);
export const useSystemChartData = (
systemStats: BeszelSystemStatsRecord[] | undefined,