Async connection management

This commit is contained in:
Gregory Schier
2024-02-05 11:29:27 -08:00
parent a7f2a86d71
commit ef7f942a8f
9 changed files with 102 additions and 84 deletions

View File

@@ -0,0 +1,7 @@
import type { GrpcConnection } from '../lib/models';
import { useGrpcConnections } from './useGrpcConnections';
export function useLatestGrpcConnection(requestId: string | null): GrpcConnection | null {
const connections = useGrpcConnections(requestId);
return connections[0] ?? null;
}