mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-25 19:01:38 +01:00
8 lines
351 B
TypeScript
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;
|
|
}
|