From 74c68ab45bab9ab74842fc903363802eee45bb56 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 21 May 2023 23:19:46 -0500 Subject: [PATCH] Properly set target from SubmitProps --- src/hooks/useLookup.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hooks/useLookup.tsx b/src/hooks/useLookup.tsx index e9e72f4..aa4de76 100644 --- a/src/hooks/useLookup.tsx +++ b/src/hooks/useLookup.tsx @@ -6,6 +6,7 @@ import type { IpNetwork, Register, RootRegistryType, + SubmitProps, TargetType, } from "@/types"; import { registryURLs } from "@/constants"; @@ -172,8 +173,11 @@ const useLookup = (warningHandler?: WarningHandler) => { } } - async function submit(): Promise { + async function submit( + props: SubmitProps + ): Promise { try { + setTarget(props.target); const response = await submitInternal(); if (response == undefined) throw new Error("Internal submission failed to yield any data.");