'use client' import { useState } from 'react' export interface ProfileFormData { username: string email: string bio?: string location?: string website?: string } export interface ProfileFormProps { initialData: ProfileFormData onSubmit: (data: ProfileFormData) => void | Promise isLoading?: boolean } export function ProfileForm({ initialData, onSubmit, isLoading = false }: ProfileFormProps) { const [formData, setFormData] = useState(initialData) const [hasChanges, setHasChanges] = useState(false) const handleChange = (field: keyof ProfileFormData, value: string) => { setFormData({ ...formData, [field]: value }) setHasChanges(true) } const handleSubmit = (e: React.FormEvent) => { e.preventDefault() onSubmit(formData) } const handleReset = () => { setFormData(initialData) setHasChanges(false) } return (
{/* Username */}
handleChange('username', e.target.value)} className="w-full px-4 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-purple-500" required />

This is how other users will see you

{/* Email */}
handleChange('email', e.target.value)} className="w-full px-4 py-3 bg-zinc-800 border border-zinc-700 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-purple-500" required />
{/* Bio */}