Display user first name in dashboard greeting
- Extract firstName/lastName from auth me() endpoint (already provided by backend) - Show first name in greeting, fallback to username if not set - Remove hardcoded 'Sabina & Malik' greeting Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
cae5e7ed67
commit
b11dc41310
@@ -3,13 +3,14 @@ import { useAuth } from "../app/AuthContext";
|
||||
|
||||
export default function Header() {
|
||||
const { user, logout } = useAuth();
|
||||
const displayName = user?.firstName || user?.username || "Benutzer";
|
||||
|
||||
return (
|
||||
<header className="header">
|
||||
|
||||
<div className="header-left">
|
||||
|
||||
<h1>Guten Morgen Sabina & Malik ☀️</h1>
|
||||
<h1>Guten Morgen {displayName} ☀️</h1>
|
||||
|
||||
<p>
|
||||
Schön, dass ihr heute wieder da seid.
|
||||
|
||||
Reference in New Issue
Block a user