diff --git a/src/app/(user)/layout.tsx b/src/app/(user)/layout.tsx index 8904c4d..536ecd3 100644 --- a/src/app/(user)/layout.tsx +++ b/src/app/(user)/layout.tsx @@ -34,15 +34,10 @@ export default function UserLayout({ useEffect(() => { if (status === 'loading') return; - // Allow public pages without authentication + // Allow public pages without authentication. + // Agents are intentionally allowed to land on /user/dashboard — the logo + // points there for all roles, so this layout must not bounce them away. if (isPublic) { - // If logged in as agent, redirect to agent dashboard only from user dashboard - if (session && pathname === '/user/dashboard') { - const userRole = (session.user as any)?.role; - if (userRole === 'AGENT') { - router.replace('/agent/dashboard'); - } - } return; }