Skip to content

Commit

Permalink
fix(docs): present useForm when copy form (#1486)
Browse files Browse the repository at this point in the history
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: #1482

Fix #1482
  • Loading branch information
onurhan1337 authored Oct 21, 2023
1 parent 44f35d5 commit dd94aa9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/www/content/docs/components/form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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"
Expand Down

1 comment on commit dd94aa9

@vercel
Copy link

@vercel vercel bot commented on dd94aa9 Oct 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./apps/www

ui-git-main-shadcn-pro.vercel.app
ui.shadcn.com
example-playground.vercel.app
ui-shadcn-pro.vercel.app

Please sign in to comment.