diff --git a/test/fields/collections/Text/CustomError.tsx b/test/fields/collections/Text/CustomError.tsx index 7ff8665fd..ab5325e9b 100644 --- a/test/fields/collections/Text/CustomError.tsx +++ b/test/fields/collections/Text/CustomError.tsx @@ -1,8 +1,10 @@ 'use client' -import { useField, useFormFields, useFormSubmitted } from '@payloadcms/ui' import React from 'react' +import { useFormFields, useFormSubmitted } from '../../../../packages/ui/src/forms/Form/context.js' +import { useField } from '../../../../packages/ui/src/forms/useField/index.js' + const CustomError: React.FC = (props) => { const { path: pathFromProps } = props const submitted = useFormSubmitted() diff --git a/test/fields/collections/Text/CustomLabel.tsx b/test/fields/collections/Text/CustomLabel.tsx index 52682363e..eacf5b043 100644 --- a/test/fields/collections/Text/CustomLabel.tsx +++ b/test/fields/collections/Text/CustomLabel.tsx @@ -1,10 +1,11 @@ 'use client' -import { useFieldPath } from '@payloadcms/ui' import React from 'react' +import { useFieldProps } from '../../../../packages/ui/src/forms/FieldPropsProvider/index.js' + const CustomLabel = () => { - const { path } = useFieldPath() + const { path } = useFieldProps() return (