From d1b27a734a5e1b69c9dcb464e8c81f868dcb506e Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 23 Oct 2025 10:11:15 -0500 Subject: [PATCH] refactor: remove JSContact and referral UI controls Remove interactive checkbox controls for JSContact and referral options from LookupInput component. These features are now enabled by default in form configuration. Cleanup includes removing unused Controller import and simplifying form state management. --- src/rdap/components/LookupInput.tsx | 43 ++++------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/src/rdap/components/LookupInput.tsx b/src/rdap/components/LookupInput.tsx index 980d891..ab36f86 100644 --- a/src/rdap/components/LookupInput.tsx +++ b/src/rdap/components/LookupInput.tsx @@ -1,11 +1,11 @@ -import { useForm, Controller } from "react-hook-form"; +import { useForm } from "react-hook-form"; import type { FunctionComponent } from "react"; import { useState, useEffect, useRef } from "react"; import { onPromise, preventDefault } from "@/lib/utils"; import type { SimplifiedTargetType, SubmitProps, TargetType } from "@/rdap/schemas"; import { TargetTypeEnum } from "@/rdap/schemas"; import { MagnifyingGlassIcon, ReloadIcon, LockClosedIcon } from "@radix-ui/react-icons"; -import { TextField, Select, Flex, Checkbox, Text, IconButton, Badge } from "@radix-ui/themes"; +import { TextField, Select, Flex, IconButton, Badge } from "@radix-ui/themes"; import type { Maybe } from "true-myth"; import { placeholders } from "@/rdap/constants"; @@ -41,12 +41,12 @@ const LookupInput: FunctionComponent = ({ onChange, detectedType, }: LookupInputProps) => { - const { register, handleSubmit, getValues, control } = useForm({ + const { register, handleSubmit, getValues } = useForm({ defaultValues: { target: "", // Not used at this time. - followReferral: false, - requestJSContact: false, + followReferral: true, + requestJSContact: true, }, }); @@ -281,39 +281,6 @@ const LookupInput: FunctionComponent = ({ - - - - - ( - - )} - /> - Request JSContact - - - - - ( - - )} - /> - Follow referral to registrar's RDAP record - - - );