From 0c21dcdd2ad9e8e33560e48890bee6529531e208 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 25 Aug 2026 09:39:56 -0700 Subject: [PATCH] add settings response type, destructure --- client/src/Pages/CreateMonitor/index.tsx | 12 ++++++------ client/src/Types/Settings.ts | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/client/src/Pages/CreateMonitor/index.tsx b/client/src/Pages/CreateMonitor/index.tsx index 2ff2a985c..05ecfdded 100644 --- a/client/src/Pages/CreateMonitor/index.tsx +++ b/client/src/Pages/CreateMonitor/index.tsx @@ -46,6 +46,7 @@ import { } from "@/Types/Monitor"; import type { Notification } from "@/Types/Notification"; import type { Tag } from "@/Types/Tag"; +import type { AppSettingsResponse } from "@/Types/Settings"; import { stepFieldsFor, monitorStepCount, @@ -273,10 +274,7 @@ const CreateMonitorPage = () => { const { data: games } = useGet("/monitors/games"); const { data: tags } = useGet("/tags/team"); const { data: proxies } = useGet("/proxies/team"); - const { data: appSettings } = useGet<{ - globalProxyEnabled?: boolean; - globalProxyId?: string | null; - }>("/settings"); + const { data: appSettings } = useGet("/settings"); const { schema, defaults } = useMonitorForm({ data: existingMonitor ?? null, @@ -505,10 +503,12 @@ const CreateMonitorPage = () => { ); const globalProxyName = - appSettings?.globalProxyEnabled === true - ? proxies?.find((proxy) => proxy.id === appSettings?.globalProxyId)?.name + appSettings?.settings?.globalProxyEnabled === true + ? proxies?.find((proxy) => proxy.id === appSettings?.settings?.globalProxyId)?.name : undefined; + console.log({ appSettings }); + return (