Files
yaak/apps/yaak-client/hooks/useLatestGrpcConnection.ts
Gregory Schier 7314aedc71 Merge main into proxy branch (formatting and docs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:09:59 -07:00

8 lines
351 B
TypeScript

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