From 9638c6c4c922e2505134ed50e187ebfcf6d594d7 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Sun, 15 Mar 2026 17:07:53 +0530 Subject: [PATCH] feat: Dispatch 'profile-updated' event after avatar update to trigger UI refresh. --- src/app/(agent)/agent/dashboard/page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/(agent)/agent/dashboard/page.tsx b/src/app/(agent)/agent/dashboard/page.tsx index bc0d36f..462c59e 100644 --- a/src/app/(agent)/agent/dashboard/page.tsx +++ b/src/app/(agent)/agent/dashboard/page.tsx @@ -206,6 +206,9 @@ export default function AgentDashboard() { console.error('Failed to get presigned URL for new avatar:', err); } } + + // Notify header and other components to refresh avatar + window.dispatchEvent(new Event('profile-updated')); }; const getProfileImageUrl = () => {