Post deletion, profile link

This commit is contained in:
Christopher
2026-01-22 14:57:42 -08:00
parent 205ec5b5cf
commit 7bc2b1c7e6
8 changed files with 143 additions and 2 deletions
+32
View File
@@ -59,6 +59,7 @@ export default function ProfilePage() {
bio: '',
avatarUrl: '',
headerUrl: '',
website: '',
});
const [saveError, setSaveError] = useState<string | null>(null);
const [isSaving, setIsSaving] = useState(false);
@@ -112,6 +113,7 @@ export default function ProfilePage() {
bio: user.bio || '',
avatarUrl: user.avatarUrl || '',
headerUrl: user.headerUrl || '',
website: user.website || '',
});
}
}, [user, currentUser]);
@@ -353,6 +355,26 @@ export default function ProfilePage() {
<span>Joined {formatDate(user.createdAt || new Date().toISOString())}</span>
</div>
{user.website && (
<div style={{
display: 'flex',
alignItems: 'center',
gap: '8px',
marginTop: '4px',
color: 'var(--accent)',
fontSize: '14px',
}}>
<Link
href={user.website.startsWith('http') ? user.website : `https://${user.website}`}
target="_blank"
rel="noopener noreferrer"
style={{ color: 'inherit', textDecoration: 'none' }}
>
{user.website.replace(/^https?:\/\/(www\.)?/, '').replace(/\/$/, '')}
</Link>
</div>
)}
<div style={{ display: 'flex', gap: '16px', marginTop: '12px' }}>
<button
onClick={() => setActiveTab('following')}
@@ -406,6 +428,16 @@ export default function ProfilePage() {
style={{ minHeight: '80px', resize: 'vertical' }}
/>
</div>
<div>
<label style={{ fontSize: '12px', color: 'var(--foreground-tertiary)' }}>Website</label>
<input
className="input"
placeholder="https://example.com"
value={profileForm.website}
onChange={(e) => setProfileForm({ ...profileForm, website: e.target.value })}
maxLength={100}
/>
</div>
<div>
<label style={{ fontSize: '12px', color: 'var(--foreground-tertiary)' }}>Avatar</label>
<div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>