// screen-secondary.jsx — Edit profile, Public profile, Balance & transactions const { useState: useSecState, useEffect: useSecEffect } = React; /* ---------------------------------------------------------------- Edit profile ----------------------------------------------------------------- */ function EditProfileScreen({ currentUser, goBack, onSave }) { const Icon = window.Icon; const u = currentUser || {}; const nameParts = (u.name || 'Heba Ali').split(' '); const [form, setForm] = useSecState({ first: nameParts[0] || 'Heba', last: nameParts.slice(1).join(' ') || 'Ali', role: u.role || 'UX / UI Designer', email: u.email || '', phone: u.phone || '', bio: u.bio || 'Product designer focused on internal tools and innovation systems.', }); const [saving, setSaving] = useSecState(false); const set = (k) => (e) => setForm(f => ({ ...f, [k]: e.target.value })); const handleSave = async () => { setSaving(true); try { const updated = await window.API.updateMe({ name: `${form.first} ${form.last}`, role: form.role, bio: form.bio, phone: form.phone }); onSave(updated); } catch (e) { onSave(null); } finally { setSaving(false); } }; return (
Edit profile
Update your details and how you appear across IdeaMint.
Profile photo
PNG or JPG, at least 400×400px.