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