Files
yaak/src-web/hooks/useLatestGrpcConnection.ts
2024-02-09 05:01:00 -08:00

8 lines
292 B
TypeScript

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;
}