more system tests as login is borked
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 19s

This commit is contained in:
2025-11-11 04:41:42 -08:00
parent 59d57d26a3
commit 88a1fb3b3c
2 changed files with 6 additions and 5 deletions

View File

@@ -747,7 +747,8 @@ function App() {
onOpenVoiceAssistant={() => setIsVoiceAssistantOpen(true)}
onSignOut={handleSignOut}
/>
{session && profile && (
{/* CRITICAL FIX: Only render the ProfileManager if a session AND a profile exist. This prevents crashes on initial load when profile is null. */}
{isProfileManagerOpen && session && profile && (
<ProfileManager
isOpen={isProfileManagerOpen}
onClose={() => setIsProfileManagerOpen(false)}

View File

@@ -22,8 +22,8 @@ export const ProfileManager: React.FC<ProfileManagerProps> = ({ isOpen, onClose,
const [activeTab, setActiveTab] = useState('profile');
// Profile state
const [fullName, setFullName] = useState(profile.full_name || '');
const [avatarUrl, setAvatarUrl] = useState(profile.avatar_url || '');
const [fullName, setFullName] = useState(profile?.full_name || '');
const [avatarUrl, setAvatarUrl] = useState(profile?.avatar_url || '');
const [profileLoading, setProfileLoading] = useState(false);
const [profileMessage, setProfileMessage] = useState('');
@@ -46,8 +46,8 @@ export const ProfileManager: React.FC<ProfileManagerProps> = ({ isOpen, onClose,
// Only reset state when the modal is opened.
// Do not reset on profile changes, which can happen during sign-out.
if (isOpen) {
setFullName(profile.full_name || '');
setAvatarUrl(profile.avatar_url || '');
setFullName(profile?.full_name || '');
setAvatarUrl(profile?.avatar_url || '');
setActiveTab('profile');
setIsConfirmingDelete(false);
setPasswordForDelete('');