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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user