"use client"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import { Input } from "@/app/_components/ui/input"
import { useToast } from "@/app/_components/ui/use-toast"
import { getServerAuthSession } from "@/server/auth";
import { api } from "@/trpc/server";
export default async function ProfileForm() {
const { toast } = useToast()
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
})
async function onSubmit(data: z.infer<typeof formSchema>) {
console.log(data)
toast({
title: "Form submitted!",
description: "Friday, February 10, 2023 at 5:57 PM",
})
await api.onboarding.form.mutate({ name: data.username })
}
return (
(deteted the data here)
)
}
"use client"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import { Input } from "@/app/_components/ui/input"
import { useToast } from "@/app/_components/ui/use-toast"
import { getServerAuthSession } from "@/server/auth";
import { api } from "@/trpc/server";
export default async function ProfileForm() {
const { toast } = useToast()
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
})
async function onSubmit(data: z.infer<typeof formSchema>) {
console.log(data)
toast({
title: "Form submitted!",
description: "Friday, February 10, 2023 at 5:57 PM",
})
await api.onboarding.form.mutate({ name: data.username })
}
return (
(deteted the data here)
)
}