diff --git a/components/AdminProtected.js b/components/AdminProtected.js index 6e66036..ea0296c 100644 --- a/components/AdminProtected.js +++ b/components/AdminProtected.js @@ -99,5 +99,6 @@ export default function AdminProtected({ children }) { ); } - return children; + // Support both render prop and children patterns + return typeof children === 'function' ? children(user) : children; } \ No newline at end of file diff --git a/components/Layout.js b/components/Layout.js index 92ebfb1..053a5e9 100644 --- a/components/Layout.js +++ b/components/Layout.js @@ -180,12 +180,16 @@ export default function Layout({ children, user = { email: 'me@randallstillwell.
{user.email}
-{user.role}
++ {user?.email || 'Guest'} +
++ {user?.role || 'visitor'} +