From c42bca76f37ef935217dbc4fa6201718af27316b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Wed, 25 Feb 2026 15:58:39 -0300 Subject: [PATCH] fix: add safety checks to Layout and continue debugging blank page --- components/Layout.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/Layout.tsx b/components/Layout.tsx index 4cbd84c..0bb306b 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -83,10 +83,12 @@ export const Layout: React.FC<{ children: React.ReactNode, currentUser: User }> {/* User Profile Mini */}
- User + User
-

{currentUser.name}

-

{currentUser.role === 'super_admin' ? 'Super Admin' : currentUser.role}

+

{currentUser?.name || 'Usuário'}

+

+ {currentUser?.role === 'super_admin' ? 'Super Admin' : (currentUser?.role || 'Agente')} +