const mutation = trpc.user.addUser.useMutation(); async function onSubmit(values: z.infer<typeof formSchema>) { await mutation.mutateAsync(values); router.push("/admin/all-employees"); }
const { data: users, isLoading } = trpc.user.getUsers.useQuery(undefined, { refetchOnMount: false, refetchOnReconnect: false, });
const mutation = trpc.user.addUser.useMutation(["addUser"]);
Type 'string[]' has no properties in common with type 'UseTRPCMutationOptions<{ name: string; email: string; username: string; password: string; role: string; }, TRPCClientErrorLike<{ input: { name: string; email: string; username: string; password: string; role: string; }; output: { user: { name: string; ... 9 more ...; | undefined;...'.ts(2559)