import { Button } from '@/components/ui/button'; import { Textarea } from '@/components/ui/textarea'; import { useAppParams } from '@/hooks/useAppParams'; import { api } from '@/trpc/client'; import { zodResolver } from '@hookform/resolvers/zod'; import { useForm } from 'react-hook-form'; import { toast } from 'sonner'; import { z } from 'zod'; import { useOpenPanel } from '@openpanel/nextjs'; import { popModal } from '.'; import { ModalContent } from './Modal/Container'; const validator = z.object({ body: z.string().min(3), }); type IForm = z.infer; const Testimonial = () => { const op = useOpenPanel(); const mutation = api.ticket.create.useMutation(); const params = useAppParams(); const form = useForm({ resolver: zodResolver(validator), }); return (

Review time 🫶

Thank you so much for using Openpanel — it truly means a great deal to me! If you're enjoying your experience, I'd be thrilled if you could leave a quick review. 😇

If you have any feedback or suggestions, I'd love to hear them as well! 🚀

{ try { await mutation.mutateAsync({ subject: 'New testimonial', body, meta: { ...params, }, }); toast.success('Thanks for your feedback 🚀'); op.track('testimonials_sent'); popModal(); } catch (e) { toast.error('Something went wrong. Please try again later.'); } })} >