fix: remove unused isEditMode params and dead clientApi import

Post-merge lint errors from dev — unused variables left behind
after subscription removal.
This commit is contained in:
Thomas Camlong committed 2026-06-25 12:01:01 +02:00
1 parent 2cb0964aa2
commit cb5ad15305
6 files changed
+7 -16

No files matched your search

@@ -2,8 +2,6 @@
import { useMemo } from "react";
import { clientApi } from "@homarr/api/client";
import type { BeszelSystemRow } from "./types";
type SystemRowWithKey = BeszelSystemRow & { _key: string };
@@ -21,7 +21,6 @@ import type { WidgetComponentProps } from "../definition";
export default function MediaServerWidget({
options,
integrationIds,
isEditMode,
}: WidgetComponentProps<"mediaServer">) {
const { data: currentStreams = [] } = clientApi.widget.mediaServer.getCurrentStreams.useQuery({
integrationIds,
@@ -17,7 +17,6 @@ import { RecentResultsSection } from "./recent-results";
export default function SpeedtestTrackerWidget({
options,
integrationIds,
isEditMode,
}: WidgetComponentProps<"speedtestTracker">) {
const t = useScopedI18n("widget.speedtestTracker");
const { data: dashboardData = [] } = clientApi.widget.speedtestTracker.getDashboard.useQuery({ integrationIds });
+2 -4
View File
@@ -17,23 +17,21 @@ export default function TracearrWidget({
options,
integrationIds,
width,
isEditMode,
}: WidgetComponentProps<"tracearr">) {
if (integrationIds.length === 0) {
throw new NoIntegrationDataError();
}
return <TracearrContent integrationIds={integrationIds} options={options} width={width} isEditMode={isEditMode} />;
return <TracearrContent integrationIds={integrationIds} options={options} width={width} />;
}
interface TracearrContentProps {
integrationIds: string[];
options: WidgetComponentProps<"tracearr">["options"];
width: number;
isEditMode: boolean;
}
function TracearrContent({ integrationIds, options, width, isEditMode }: TracearrContentProps) {
function TracearrContent({ integrationIds, options, width }: TracearrContentProps) {
const t = useScopedI18n("widget.tracearr");
const { data: dashboardData = [] } = clientApi.widget.tracearr.getDashboard.useQuery({ integrationIds });
+3 -4
View File
@@ -23,22 +23,21 @@ const statusColors: Record<UpsStatus, string> = {
type UpsLayout = "mini" | "compact" | "full";
export default function UpsWidget({ options, integrationIds, isEditMode, width }: WidgetComponentProps<"ups">) {
export default function UpsWidget({ options, integrationIds, width }: WidgetComponentProps<"ups">) {
if (integrationIds.length === 0) {
throw new NoIntegrationSelectedError();
}
return <UpsContent integrationIds={integrationIds} options={options} isEditMode={isEditMode} width={width} />;
return <UpsContent integrationIds={integrationIds} options={options} width={width} />;
}
interface UpsContentProps {
integrationIds: string[];
options: WidgetComponentProps<"ups">["options"];
isEditMode: boolean;
width: number;
}
function UpsContent({ integrationIds, options, isEditMode, width }: UpsContentProps) {
function UpsContent({ integrationIds, options, width }: UpsContentProps) {
const t = useScopedI18n("widget.ups");
const { data } = clientApi.widget.ups.getSummaries.useQuery({ integrationIds });
@@ -87,7 +87,6 @@ const heroVariantByRing = {
export default function UptimeKumaWidget({
integrationIds,
isEditMode,
options,
width,
}: WidgetComponentProps<"uptimeKuma">) {
@@ -95,17 +94,16 @@ export default function UptimeKumaWidget({
throw new NoIntegrationDataError();
}
return <UptimeKumaContent integrationIds={integrationIds} isEditMode={isEditMode} options={options} width={width} />;
return <UptimeKumaContent integrationIds={integrationIds} options={options} width={width} />;
}
interface UptimeKumaContentProps {
integrationIds: string[];
isEditMode: boolean;
options: WidgetComponentProps<"uptimeKuma">["options"];
width: number;
}
function UptimeKumaContent({ integrationIds, isEditMode, options, width }: UptimeKumaContentProps) {
function UptimeKumaContent({ integrationIds, options, width }: UptimeKumaContentProps) {
const t = useScopedI18n("widget.uptimeKuma");
const { data: dashboardData } = clientApi.widget.uptimeKuma.getDashboard.useQuery({ integrationIds });