feat: switch from useFormContext to useRemixFormContext in Input component
This commit is contained in:
parent
0b6b43a951
commit
f66ddde6f0
@ -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 = <TFormValues extends Record<string, unknown>>(
|
||||
const {
|
||||
register,
|
||||
formState: { errors },
|
||||
} = useFormContext()
|
||||
} = useRemixFormContext()
|
||||
|
||||
const error: FieldError = get(errors, name)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user