remove the need to resource and profile data on landing page

This commit is contained in:
Mo Tarbin
2026-02-08 16:08:56 -05:00
parent 2c1458e026
commit b31bcc2a9c
5 changed files with 18 additions and 22 deletions

View File

@@ -18,9 +18,9 @@ const MAX_RECONNECT_ATTEMPTS = 10 // Circuit breaker limit
const CIRCUIT_BREAKER_RESET_TIME = 600000 // 10 minutes
export const useSSE = () => {
const { data: userProfile } = useUserProfile()
const { isAuthenticated, token } = useAuth()
// Only fetch user profile if authenticated - prevents unnecessary API calls on landing page
const { data: userProfile } = useUserProfile()
const [connectionState, setConnectionState] = useState(SSE_STATES.CLOSED)
const [lastEvent, setLastEvent] = useState(null)
const [error, setError] = useState(null)