From feec19ab1358c73622a5c0553931e263fbf30f90 Mon Sep 17 00:00:00 2001 From: Siyuan Date: Fri, 10 Oct 2025 13:59:11 +0000 Subject: [PATCH] fix ui lint errors --- ui/src/components/Ipv6NetworkCard.tsx | 1 + ui/src/routes/devices.$id.settings.network.tsx | 6 +++--- ui/src/utils/jsonrpc.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/components/Ipv6NetworkCard.tsx b/ui/src/components/Ipv6NetworkCard.tsx index d34da739..a2a3d4da 100644 --- a/ui/src/components/Ipv6NetworkCard.tsx +++ b/ui/src/components/Ipv6NetworkCard.tsx @@ -1,4 +1,5 @@ import { cx } from "@/cva.config"; + import { NetworkState } from "../hooks/stores"; import { LifeTimeLabel } from "../routes/devices.$id.settings.network"; diff --git a/ui/src/routes/devices.$id.settings.network.tsx b/ui/src/routes/devices.$id.settings.network.tsx index b0e4487b..7ba65957 100644 --- a/ui/src/routes/devices.$id.settings.network.tsx +++ b/ui/src/routes/devices.$id.settings.network.tsx @@ -127,7 +127,7 @@ export default function SettingsNetworkRoute() { notifications.error(err instanceof Error ? err.message : "Unknown error"); throw err; } - }, []); + }, [setNetworkState]); const formMethods = useForm({ mode: "onBlur", @@ -155,7 +155,7 @@ export default function SettingsNetworkRoute() { const { register, handleSubmit, watch, formState, reset } = formMethods; const onSubmit = async (settings: NetworkSettings) => { - send("setNetworkSettings", { settings }, async (resp: any) => { + send("setNetworkSettings", { settings }, async (resp) => { if ("error" in resp) { return notifications.error( resp.error.data ? resp.error.data : resp.error.message, @@ -205,7 +205,7 @@ export default function SettingsNetworkRoute() { const ipv6mode = watch("ipv6_mode"); const onDhcpLeaseRenew = () => { - send("renewDHCPLease", {}, (resp: any) => { + send("renewDHCPLease", {}, (resp) => { if ("error" in resp) { notifications.error("Failed to renew lease: " + resp.error.message); } else { diff --git a/ui/src/utils/jsonrpc.ts b/ui/src/utils/jsonrpc.ts index 43ab7ec2..ecfa1c4b 100644 --- a/ui/src/utils/jsonrpc.ts +++ b/ui/src/utils/jsonrpc.ts @@ -41,7 +41,7 @@ export function callJsonRpc(options: JsonRpcCallOptions): Promise { try {