Hide header actions when signed out

This commit is contained in:
2026-01-23 19:16:17 +13:00
parent 49e9ee771f
commit 24685a5371
4 changed files with 21 additions and 13 deletions

View File

@@ -40,19 +40,19 @@ export default function HeaderActions() {
}
}
if (!signedIn) {
return null
}
return (
<div className="header-actions">
<a href="/">Requests</a>
<a href="/how-it-works">How it works</a>
{signedIn && <a href="/profile">My profile</a>}
<a href="/profile">My profile</a>
{role === 'admin' && <a href="/admin">Settings</a>}
{signedIn ? (
<button type="button" className="header-link" onClick={signOut}>
Sign out
</button>
) : (
<a href="/login">Sign in</a>
)}
<button type="button" className="header-link" onClick={signOut}>
Sign out
</button>
</div>
)
}