watching lovable.dev
Overview

Good evening. Three issues are waiting.

Active issues
3
Resolved today
12
Credits saved
428
jeradin — watching lovable.dev
live
Detected · 3 issues
App.tsx:42
critical
Undefined state on render
api/auth.ts:18
warn
Missing await on fetch
ui/Modal.tsx:71
info
Hydration mismatch hint
Resolved · today
Stale closure in useEffect
Missing dep in array
App.tsx · line 42

user is undefined when profile.name renders

App.tsxread-only · jeradin will not write
  const { data: user } = useUser()
- return <h1>Hello, {user.profile.name}</h1>
+ return <h1>Hello, {user?.profile?.name ?? "there"}</h1>
Semantic explanation

useUser() resolves asynchronously, so on the first render user is undefined. Reading .profile.name throws before the fetch completes. Add optional chaining or guard with a loading state.