mirror of
https://github.com/mountain-loop/yaak.git
synced 2025-12-23 22:48:55 -05: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;
|
|
}
|