feat: wire photo upload/delete changes upward for instant page-wide refresh

This commit is contained in:
2026-05-09 14:00:13 +08:00
parent 11d944bef2
commit f808b8325a
4 changed files with 23 additions and 3 deletions
+5
View File
@@ -82,6 +82,10 @@ export default function ProfilePage() {
return null
}
const handleImageChange = (url: string | null) => {
setProfile((prev) => (prev ? { ...prev, image: url } : null))
}
const tabs: { id: Tab; label: string; icon: typeof Bookmark }[] = [
{ id: "overview", label: "Overview", icon: TrendingUp },
{ id: "saved", label: "Saved Games", icon: Bookmark },
@@ -178,6 +182,7 @@ export default function ProfilePage() {
createdAt={profile.createdAt}
image={profile.image}
userId={profile.id}
onImageChange={handleImageChange}
/>
)}
</motion.div>