feat(auth) : improve Google account handling

This commit is contained in:
2026-10-12 00:51:29 +07:00 Unverified
parent e2af59292c
commit fdbabecf56
7 changed files with 80 additions and 11 deletions
+5 -1
View File
@@ -24,12 +24,14 @@ export function ProfileForm({
image: initialImage,
nextPath,
setup = false,
googlePhotoDefault = false,
}: {
name: string;
email: string;
image: string | null;
nextPath?: string;
setup?: boolean;
googlePhotoDefault?: boolean;
}) {
const [name, setName] = useState(initialName);
const [file, setFile] = useState<File | null>(null);
@@ -83,7 +85,9 @@ export function ProfileForm({
<form id="profile-form" onSubmit={save}>
<FieldGroup>
{setup && <p className="text-sm text-muted-foreground">
สร้างบัญชีเรียบร้อยแล้ว เพิ่มรูปโปรไฟล์ได้ตามต้องการ หรือกดข้ามเพื่อเริ่มใช้งาน คุณสามารถยืนยันอีเมลภายหลังได้ที่หน้าโปรไฟล์
{googlePhotoDefault
? "ใช้รูปโปรไฟล์จาก Google เป็นรูปเริ่มต้นแล้ว หากต้องการเปลี่ยน เลือกรูปใหม่ได้ที่นี่ หรือกดข้ามเพื่อเริ่มใช้งาน"
: "สร้างบัญชีเรียบร้อยแล้ว เพิ่มรูปโปรไฟล์ได้ตามต้องการ หรือกดข้ามเพื่อเริ่มใช้งาน คุณสามารถยืนยันอีเมลภายหลังได้ที่หน้าโปรไฟล์"}
</p>}
<Field>
<FieldLabel htmlFor="profile-image">รูปโปรไฟล์</FieldLabel>