import { useForm } from "react-hook-form"; import { trpc } from "@calcom/trpc"; import { Meta, Form, Button, TextField, showToast } from "@calcom/ui"; type FormValues = { name?: string | null; }; export default function KYCVerificationView() { const teamForm = useForm(); const userForm = useForm(); const mutation = trpc.viewer.kycVerification.verify.useMutation({ onSuccess: async (data) => { showToast(`Successfully verified ${data.isTeam ? "team" : "user"} ${data.name}`, "success"); }, onError: (error) => { showToast(`Verification failed: ${error.message}`, "error"); }, }); return (
Verify Team
{ mutation.mutate({ name: values.name || "", isTeam: true, }); }}>
Verify User
{ mutation.mutate({ name: values.name || "", isTeam: false, }); }}>
); }