Files
yaak/src-web/hooks/useLatestGrpcConnection.ts
2024-10-08 14:16:57 -07:00

7 lines
295 B
TypeScript

import type { GrpcConnection } from '@yaakapp-internal/models';
import { useGrpcConnections } from './useGrpcConnections';
export function useLatestGrpcConnection(requestId: string | null): GrpcConnection | null {
return useGrpcConnections().find((c) => c.requestId === requestId) ?? null;
}