diff --git a/ui/src/components/UsbDeviceSetting.tsx b/ui/src/components/UsbDeviceSetting.tsx index 8b68f16..2663674 100644 --- a/ui/src/components/UsbDeviceSetting.tsx +++ b/ui/src/components/UsbDeviceSetting.tsx @@ -127,7 +127,7 @@ export function UsbDeviceSetting() { ); const handlePresetChange = useCallback( - async (e: React.ChangeEvent) => { + (e: React.ChangeEvent) => { const newPreset = e.target.value; setSelectedPreset(newPreset); diff --git a/ui/src/components/UsbInfoSetting.tsx b/ui/src/components/UsbInfoSetting.tsx index 1d6a455..cc837f4 100644 --- a/ui/src/components/UsbInfoSetting.tsx +++ b/ui/src/components/UsbInfoSetting.tsx @@ -137,7 +137,7 @@ export function UsbInfoSetting() { ); useEffect(() => { - send("getDeviceID", {}, async (resp: JsonRpcResponse) => { + send("getDeviceID", {}, (resp: JsonRpcResponse) => { if ("error" in resp) { return notifications.error( `Failed to get device ID: ${resp.error.data || "Unknown error"}`, diff --git a/ui/src/components/WebRTCVideo.tsx b/ui/src/components/WebRTCVideo.tsx index b24ced1..21d4aca 100644 --- a/ui/src/components/WebRTCVideo.tsx +++ b/ui/src/components/WebRTCVideo.tsx @@ -411,7 +411,7 @@ export default function WebRTCVideo() { ); const keyDownHandler = useCallback( - async (e: KeyboardEvent) => { + (e: KeyboardEvent) => { e.preventDefault(); const prev = useHidStore.getState(); let code = e.code; diff --git a/ui/src/routes/devices.$id.mount.tsx b/ui/src/routes/devices.$id.mount.tsx index c017920..295429f 100644 --- a/ui/src/routes/devices.$id.mount.tsx +++ b/ui/src/routes/devices.$id.mount.tsx @@ -89,7 +89,7 @@ export function Dialog({ onClose }: { onClose: () => void }) { console.log(`Mounting ${url} as ${mode}`); setMountInProgress(true); - send("mountWithHTTP", { url, mode }, async (resp: JsonRpcResponse) => { + send("mountWithHTTP", { url, mode }, (resp: JsonRpcResponse) => { if ("error" in resp) triggerError(resp.error.message); clearMountMediaState(); @@ -108,7 +108,7 @@ export function Dialog({ onClose }: { onClose: () => void }) { console.log(`Mounting ${fileName} as ${mode}`); setMountInProgress(true); - send("mountWithStorage", { filename: fileName, mode }, async (resp: JsonRpcResponse) => { + send("mountWithStorage", { filename: fileName, mode }, (resp: JsonRpcResponse) => { if ("error" in resp) triggerError(resp.error.message); clearMountMediaState(); diff --git a/ui/src/routes/devices.$id.settings._index.tsx b/ui/src/routes/devices.$id.settings._index.tsx index 5203b4c..4fb35ed 100644 --- a/ui/src/routes/devices.$id.settings._index.tsx +++ b/ui/src/routes/devices.$id.settings._index.tsx @@ -2,7 +2,7 @@ import { LoaderFunctionArgs, redirect } from "react-router-dom"; import { getDeviceUiPath } from "../hooks/useAppNavigation"; -const loader = async ({ params }: LoaderFunctionArgs) => { +const loader = ({ params }: LoaderFunctionArgs) => { return redirect(getDeviceUiPath("/settings/general", params.id)); } diff --git a/ui/src/routes/devices.$id.settings.access._index.tsx b/ui/src/routes/devices.$id.settings.access._index.tsx index b3e0c9a..52c6fc6 100644 --- a/ui/src/routes/devices.$id.settings.access._index.tsx +++ b/ui/src/routes/devices.$id.settings.access._index.tsx @@ -87,7 +87,7 @@ export default function SettingsAccessIndexRoute() { }); }, [send]); - const deregisterDevice = async () => { + const deregisterDevice = () => { send("deregisterDevice", {}, (resp: JsonRpcResponse) => { if ("error" in resp) { notifications.error( @@ -198,7 +198,7 @@ export default function SettingsAccessIndexRoute() { getCloudState(); getTLSState(); - send("getDeviceID", {}, async (resp: JsonRpcResponse) => { + send("getDeviceID", {}, (resp: JsonRpcResponse) => { if ("error" in resp) return console.error(resp.error); setDeviceId(resp.result as string); }); diff --git a/ui/src/routes/devices.$id.settings.general.update.tsx b/ui/src/routes/devices.$id.settings.general.update.tsx index 16b3378..a641cbc 100644 --- a/ui/src/routes/devices.$id.settings.general.update.tsx +++ b/ui/src/routes/devices.$id.settings.general.update.tsx @@ -62,7 +62,7 @@ export function Dialog({ const { modalView, setModalView, otaState } = useUpdateStore(); const onFinishedLoading = useCallback( - async (versionInfo: SystemVersionInfo) => { + (versionInfo: SystemVersionInfo) => { const hasUpdate = versionInfo?.systemUpdateAvailable || versionInfo?.appUpdateAvailable; @@ -141,7 +141,7 @@ function LoadingState({ const getVersionInfo = useCallback(() => { return new Promise((resolve, reject) => { - send("getUpdateStatus", {}, async (resp: JsonRpcResponse) => { + send("getUpdateStatus", {}, (resp: JsonRpcResponse) => { if ("error" in resp) { notifications.error(`Failed to check for updates: ${resp.error}`); reject(new Error("Failed to check for updates")); diff --git a/ui/src/routes/devices.$id.settings.mouse.tsx b/ui/src/routes/devices.$id.settings.mouse.tsx index 42d6fae..ab1aec6 100644 --- a/ui/src/routes/devices.$id.settings.mouse.tsx +++ b/ui/src/routes/devices.$id.settings.mouse.tsx @@ -121,7 +121,7 @@ export default function SettingsMouseRoute() { const saveJigglerConfig = useCallback( (jigglerConfig: JigglerConfig) => { // We assume the jiggler should be set to enabled if the config is being updated - send("setJigglerState", { enabled: true }, async (resp: JsonRpcResponse) => { + send("setJigglerState", { enabled: true }, (resp: JsonRpcResponse) => { if ("error" in resp) { return notifications.error( `Failed to set jiggler state: ${resp.error.data || "Unknown error"}`, @@ -129,7 +129,7 @@ export default function SettingsMouseRoute() { } }); - send("setJigglerConfig", { jigglerConfig }, async (resp: JsonRpcResponse) => { + send("setJigglerConfig", { jigglerConfig }, (resp: JsonRpcResponse) => { if ("error" in resp) { const errorMsg = resp.error.data || "Unknown error"; @@ -163,7 +163,7 @@ export default function SettingsMouseRoute() { // We don't need to update the device jiggler state when the option is "disabled" if (option === "disabled") { - send("setJigglerState", { enabled: false }, async (resp: JsonRpcResponse) => { + send("setJigglerState", { enabled: false }, (resp: JsonRpcResponse) => { if ("error" in resp) { return notifications.error( `Failed to set jiggler state: ${resp.error.data || "Unknown error"}`, diff --git a/ui/src/routes/devices.$id.tsx b/ui/src/routes/devices.$id.tsx index 650bb14..1017eb4 100644 --- a/ui/src/routes/devices.$id.tsx +++ b/ui/src/routes/devices.$id.tsx @@ -112,7 +112,7 @@ const cloudLoader = async (params: Params): Promise => return { user, iceConfig, deviceName: device.name || device.id }; }; -const loader = async ({ params }: LoaderFunctionArgs) => { +const loader = ({ params }: LoaderFunctionArgs) => { return import.meta.env.MODE === "device" ? deviceLoader() : cloudLoader(params); }; @@ -450,7 +450,7 @@ export default function KvmIdRoute() { } }; - pc.onicecandidate = async ({ candidate }) => { + pc.onicecandidate = ({ candidate }) => { if (!candidate) return; if (candidate.candidate === "") return; sendWebRTCSignal("new-ice-candidate", candidate); @@ -733,7 +733,7 @@ export default function KvmIdRoute() { useEffect(() => { if (appVersion) return; - send("getUpdateStatus", {}, async (resp: JsonRpcResponse) => { + send("getUpdateStatus", {}, (resp: JsonRpcResponse) => { if ("error" in resp) { notifications.error(`Failed to get device version: ${resp.error}`); return