diff --git a/src/app/rdp/RdpClient.tsx b/src/app/rdp/RdpClient.tsx index 690591c3d..00e8ec55a 100644 --- a/src/app/rdp/RdpClient.tsx +++ b/src/app/rdp/RdpClient.tsx @@ -14,6 +14,7 @@ import type { RdpFileTransferProvider, FileInfo } from "@devolutions/iron-remote-desktop-rdp/dist"; +import { GetBrowserTargetResponse } from "@server/routers/resource"; declare module "react" { namespace JSX { @@ -31,12 +32,6 @@ declare module "react" { } } -type Target = { - ip: string; - port: number; - authToken: string; -}; - type FormState = { username: string; password: string; @@ -59,7 +54,7 @@ export default function RdpClient({ target, error }: { - target: Target | null; + target: GetBrowserTargetResponse | null; error: string | null; }) { const STORAGE_KEY = "pangolin_rdp_credentials"; diff --git a/src/app/vnc/VncClient.tsx b/src/app/vnc/VncClient.tsx index c48472b8a..b6c6e61ee 100644 --- a/src/app/vnc/VncClient.tsx +++ b/src/app/vnc/VncClient.tsx @@ -5,12 +5,7 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { toast } from "@app/hooks/useToast"; - -type Target = { - ip: string; - port: number; - authToken: string; -}; +import { GetBrowserTargetResponse } from "@server/routers/resource"; type FormState = { password: string; @@ -20,7 +15,7 @@ export default function VncClient({ target, error }: { - target: Target | null; + target: GetBrowserTargetResponse | null; error: string | null; }) { const STORAGE_KEY = "pangolin_vnc_credentials"; diff --git a/src/app/vnc/page.tsx b/src/app/vnc/page.tsx index 32fbdeea5..e99847634 100644 --- a/src/app/vnc/page.tsx +++ b/src/app/vnc/page.tsx @@ -15,7 +15,7 @@ export default async function VncPage() { const host = headersList.get("host") || ""; const hostname = host.split(":")[0]; - let target: { ip: string; port: number; authToken: string } | null = null; + let target: GetBrowserTargetResponse | null = null; let error: string | null = null; try {