diff --git a/frontend/dist/index.html b/frontend/dist/index.html
index f1b6143..6507ba2 100644
--- a/frontend/dist/index.html
+++ b/frontend/dist/index.html
@@ -11,8 +11,8 @@
Schichtplaner — Veranstaltungsschichtpläne
-
-
+
+
diff --git a/frontend/src/components/ProfileModal.jsx b/frontend/src/components/ProfileModal.jsx
index 61a65fd..f38352b 100644
--- a/frontend/src/components/ProfileModal.jsx
+++ b/frontend/src/components/ProfileModal.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react';
+import React, { useState, useEffect } from 'react';
import { X, User, Award, Check, AlertCircle, CheckCircle2 } from 'lucide-react';
import { apiFetch } from '../api/client';
import { getRandomSkillColor } from '../utils/colors';
@@ -14,6 +14,17 @@ export default function ProfileModal({ user, skills = [], onClose, onUserUpdated
safeUserSkills.map(s => (typeof s === 'object' ? s.id : s))
);
+ useEffect(() => {
+ if (user) {
+ setDisplayName(user.display_name || user.username || '');
+ const uSkills = user.skills ? (Array.isArray(user.skills) ? user.skills : []) : [];
+ setSelectedSkillIds(uSkills.map(s => (typeof s === 'object' ? s.id : s)));
+ } else {
+ setDisplayName(localStorage.getItem('guest_display_name') || '');
+ setSelectedSkillIds([]);
+ }
+ }, [user]);
+
// New skill fields
const [newSkillName, setNewSkillName] = useState('');
const [newSkillDesc, setNewSkillDesc] = useState('');
@@ -93,7 +104,7 @@ export default function ProfileModal({ user, skills = [], onClose, onUserUpdated
return (