fix: handle undefined user name in UI components

- Added null check in getUserInitials function to return "??" for undefined names
- Fixed logout button to handle undefined user.name when displaying first name
- Prevents 500 errors when rendering components for users without names

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Valknar XXX
2025-10-28 04:48:41 +01:00
parent e226a47028
commit 5bd2d9c215
2 changed files with 2 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ export const calcReadingTime = (text: string) => {
};
export const getUserInitials = (name: string) => {
if (!name) return "??";
return name
.split(" ")
.map((word) => word.charAt(0))