import { Controller, useFormContext } from "react-hook-form"; import { z } from "zod"; import { FormControl, Input, TextArea } from "@app/components/v2"; import { slugSchema } from "@app/lib/schemas"; export const genericAccountFieldsSchema = z.object({ name: slugSchema({ min: 1, max: 64, field: "Name" }), description: z.string().max(512).nullable().optional() }); export const GenericAccountFields = () => { const { formState: { errors }, control } = useFormContext<{ name: string; description: string }>(); return ( <> ( )} /> (