mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-30 14:12:07 +02:00
Fix performance related to having 100s of requests (#123)
This commit is contained in:
@@ -2,6 +2,5 @@ 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;
|
||||
return useGrpcConnections().find((c) => c.requestId === requestId) ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user