"use client"; import { Camera, Github, Globe, Linkedin, MapPin, Twitter } from "lucide-react"; import { useState } from "react"; import { FileUpload, FileUploadTrigger } from "@/components/diceui/file-upload"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/lib/utils"; interface ProfileData { name: string; username: string; email: string; avatar?: string; bio?: string; role?: string; location?: string; website?: string; twitter?: string; linkedin?: string; github?: string; } interface SettingsProfile5Props { defaultValues?: Partial; className?: string; } const SettingsProfile5 = ({ defaultValues = { name: "ژوبین چناری", username: "jordanchen", email: "jordan.chen@email.com", avatar: "/block-media/shadcnblocks/block/avatar/avatar3.jpg", bio: "مهندس ارشد پلتفرم؛ ابزارهای داخلی فروش و اتوماسیون سامانه مدیریت ارتباط با مشتری می‌سازم.", role: "مهندس ارشد پلتفرم", location: "تهران، ایران", website: "https://jordanchen.dev", twitter: "jordanchen", linkedin: "jordanchen", github: "jordanchen", }, className, }: SettingsProfile5Props) => { const [formData, setFormData] = useState(defaultValues); const [avatarFiles, setAvatarFiles] = useState([]); const updateField = (field: keyof ProfileData, value: string) => { setFormData((prev) => ({ ...prev, [field]: value })); }; const avatarPreview = avatarFiles.length > 0 ? URL.createObjectURL(avatarFiles[0]) : formData.avatar; const initials = formData.name ?.split(" ") .map((n) => n[0]) .join("") .toUpperCase(); return (

ویرایش پروفایل

اطلاعات پروفایل را ویرایش کنید؛ تغییرات زنده در پیش‌نمایش دیده می‌شود.

{/* Edit Form - Takes more space */}
اطلاعات پایه مشخصات عمومی که در فضای کاری دیده می‌شود
{initials}

عکس پروفایل

JPG، PNG یا WEBP — حداکثر ۲ مگابایت.

updateField("name", e.target.value)} />
updateField("username", e.target.value)} />
updateField("role", e.target.value)} placeholder="مثال: مدیر موفقیت مشتری" />