fix: workspace spinner — use profile (not null user) and add 8s context timeouts

singlePlayerPage was using useUser().user which is always null (no setter
in UserContext). This caused the redirect effect to always fire, making
the workspace completely inaccessible. Fixed by destructuring profile as
user, which IS properly set from the Supabase profiles query.

Also added 8s timeout to NeoUserContext.switchContext call to match the
NeoInstituteContext timeout fix, preventing infinite spinner if the
navigation API call hangs.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-21 17:43:38 +00:00
co-authored by Claude Sonnet 4.6
parent ab1f8111f6
commit 679653c118
2 changed files with 13 additions and 7 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ interface LoadingState {
export default function SinglePlayerPage() {
// Context hooks with initialization states
const { user, loading: userLoading } = useUser();
const { profile: user, loading: userLoading } = useUser();
const {
tldrawPreferences,
initializePreferences,