Repository: ui
Issue: [bug]: Unhandled Runtime Error TypeError: Cannot destructure property 'getFieldState' of '(0 , {imported module [project]/nodemodules/.pnpm/react-hook-form@7.53.2react@18.3.1/nodemodules/react-hook-form/dist/index.esm.mjs [app-client] (ecmascript)}.useFormContext)(...)' as it is null.
Labels: bug

### Describe the bug

![image](https://github.com/user-attachments/assets/2139fc5c-2c40-4260-974e-85c9b4d34617)
React does not recognize the `handleSubmit` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `handlesubmit` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `setValue` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `setvalue` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `getValues` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `getvalues` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `resetField` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `resetfield` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `clearErrors` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `clearerrors` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `setError` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `seterror` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `setFocus` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `setfocus` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `getFieldState` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `getfieldstate` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
React does not recognize the `formState` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `formstate` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
Invalid values for props `trigger`, `register`, `watch`, `reset`, `unregister` on <form> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior 
 ⨯ src/components/ui/form.tsx (47:11) @ useFormField
 ⨯ TypeError: Cannot destructure property 'getFieldState' of '(0 , __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f$react$2d$hook$2d$form$40$7$2e$53$2e$2_react$40$18$2e$3$2e$1$2f$node_modules$2f$react$2d$hook$2d$form$2f$dist$2f$index$2e$esm$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__.useFormContext)(...)' as it is null.
    at useFormField (./src/components/ui/form.tsx:47:11)
    at FormLabel (./src/components/ui/form.tsx:93:33)
digest: "2630363313"
  45 |   const fieldContext = React.useContext(FormFieldContext);
  46 |   const itemContext = React.useContext(FormItemContext);
> 47 |   const { getFieldState, formState } = useFormContext();
     |           ^
  48 |
  49 |   const fieldState = getFieldState(fieldContext.name, formState);
  50 |

### Affected component/components

Form

### How to reproduce

1. install nextjs latest project and shadcn
2. add form 
3. run the development server

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
## Hardware Information:
- **Memory:**                                      8.0 GiB
- **Processor:**                                   Intel® Core™ i5-10210U × 8
- **Graphics:**                                    Intel® UHD Graphics (CML GT2)
- **Graphics 1:**                                  NVIDIA GeForce MX250
- **Disk Capacity:**                               512.1 GB

## Software Information:
- **Firmware Version:**                            1.24.0
- **OS Name:**                                     Ubuntu 24.04.1 LTS
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               46
- **Windowing System:**                            X11
- **Kernel Version:**                              Linux 6.8.0-49-generic


Google Chrome
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues