mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-31 14:33:18 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
7
apps/yaak-client/hooks/useLatestHttpResponse.ts
Normal file
7
apps/yaak-client/hooks/useLatestHttpResponse.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { HttpResponse } from '@yaakapp-internal/models';
|
||||
import { httpResponsesAtom } from '@yaakapp-internal/models';
|
||||
import { useAtomValue } from 'jotai';
|
||||
|
||||
export function useLatestHttpResponse(requestId: string | null): HttpResponse | null {
|
||||
return useAtomValue(httpResponsesAtom).find((r) => r.requestId === requestId) ?? null;
|
||||
}
|
||||
Reference in New Issue
Block a user