fix(docs): present useForm when copy form (#1486)

When I tried it after the attached issue, I realized;
For someone who's absolutely copying and pasting form the guide, this would give an error, as useForm is not imported in the guide. So I fixed that.

Related issue: https://github.com/shadcn-ui/ui/issues/1482

Fix #1482
This commit is contained in:
onurhan
2023-10-21 15:16:22 +03:00
committed by GitHub
parent 44f35d55b0
commit dd94aa936f

View File

@@ -141,6 +141,7 @@ Use the `useForm` hook from `react-hook-form` to create a form.
"use client"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
const formSchema = z.object({
@@ -177,6 +178,7 @@ We can now use the `<Form />` components to build our form.
"use client"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { Button } from "@/components/ui/button"