This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { supabase } from '@/lib/supabase'
|
||||
import { getSessionSafe } from '@/lib/supabase'
|
||||
import { supabaseActivityRepo } from '@/persistence/supabase/activity-repo'
|
||||
import { supabaseResourceRepo } from '@/persistence/supabase/resource-repo'
|
||||
import { supabaseProcessRepo } from '@/persistence/supabase/process-repo'
|
||||
@@ -30,8 +30,8 @@ export function useReportData(processId: string): ReportData {
|
||||
setIsLoading(true)
|
||||
setError(null)
|
||||
try {
|
||||
// Barrera única: garantiza sesión restaurada antes del fan-out en paralelo
|
||||
await supabase.auth.getSession()
|
||||
// Barrera única con timeout: garantiza sesión restaurada antes del fan-out en paralelo
|
||||
await getSessionSafe()
|
||||
const [proc, sim, acts, res] = await Promise.all([
|
||||
supabaseProcessRepo.getById(processId),
|
||||
supabaseSimulationRepo.getLatestByProcess(processId),
|
||||
|
||||
Reference in New Issue
Block a user