Files
yaak/src-web/hooks/useLatestGrpcConnection.ts
2024-09-22 21:27:10 -07:00

8 lines
303 B
TypeScript

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