import { zodResolver } from "@hookform/resolvers/zod"; import { X } from "@phosphor-icons/react"; import { defaultProject, projectSchema } from "@reactive-resume/schema"; import { Badge, BadgeInput, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, RichInput, } from "@reactive-resume/ui"; import { AnimatePresence, motion } from "framer-motion"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { AiActions } from "@/client/components/ai-actions"; import { SectionDialog } from "../sections/shared/section-dialog"; import { URLInput } from "../sections/shared/url-input"; const formSchema = projectSchema; type FormValues = z.infer; export const ProjectsDialog = () => { const form = useForm({ defaultValues: defaultProject, resolver: zodResolver(formSchema), }); return ( id="projects" form={form} defaultValues={defaultProject}>
( Name )} /> ( Description )} /> ( Date )} /> ( Website )} /> ( Summary field.onChange(value)} footer={(editor) => ( )} /> )} /> (
Keywords You can add multiple keywords by separating them with a comma.
{field.value.map((item, index) => ( { field.onChange(field.value.filter((v) => item !== v)); }} > {item} ))}
)} />
); };