From f66ddde6f01fde92b6c92741f11806f857b8674f Mon Sep 17 00:00:00 2001 From: Ardeman Date: Fri, 28 Feb 2025 09:12:38 +0800 Subject: [PATCH] feat: switch from useFormContext to useRemixFormContext in Input component --- app/components/ui/input.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/ui/input.tsx b/app/components/ui/input.tsx index 5945534..3edc039 100644 --- a/app/components/ui/input.tsx +++ b/app/components/ui/input.tsx @@ -1,12 +1,12 @@ import { useState, type ComponentProps, type ReactNode } from 'react' import { get, - useFormContext, type FieldError, type FieldValues, type Path, type RegisterOptions, } from 'react-hook-form' +import { useRemixFormContext } from 'remix-hook-form' import { EyeIcon } from '~/components/icons/eye' @@ -31,7 +31,7 @@ export const Input = >( const { register, formState: { errors }, - } = useFormContext() + } = useRemixFormContext() const error: FieldError = get(errors, name)