added google auth provider
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s

This commit is contained in:
2025-03-16 14:34:32 +01:00
parent c6cfecdb0f
commit b171956105
15 changed files with 600 additions and 28 deletions
+4 -4
View File
@@ -14,21 +14,21 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { z } from "zod";
import { userProfileSchema } from "@/lib/validation/zod/user";
import { userSchema } from "@/lib/validation/zod/user";
import { User } from "next-auth";
import { updateUserProfile } from "@/server/actions/user";
import { toast } from "sonner";
function UserForm({ server_user, cb }: { server_user: User; cb?: () => void }) {
const form = useForm<z.infer<typeof userProfileSchema>>({
resolver: zodResolver(userProfileSchema),
const form = useForm<z.infer<typeof userSchema>>({
resolver: zodResolver(userSchema),
defaultValues: {
name: server_user?.name ?? "",
},
});
// 2. Define a submit handler.
async function onSubmit(values: z.infer<typeof userProfileSchema>) {
async function onSubmit(values: z.infer<typeof userSchema>) {
// Do something with the form values.
// ✅ This will be type-safe and validated.
const { success } = await updateUserProfile(values);