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:
Felix Kemmler
2026-08-10 22:02:57 +02:00
co-authored by Claude Haiku 4.5
parent cae5e7ed67
commit b11dc41310
2 changed files with 10 additions and 2 deletions
+2 -1
View File
@@ -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.