mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-19 17:17:50 +01:00
14 lines
416 B
TypeScript
14 lines
416 B
TypeScript
import { NAMESPACE_GLOBAL } from '../lib/keyValueStore';
|
|
import { useKeyValue } from './useKeyValue';
|
|
|
|
export function protoFilesArgs(requestId: string | null) {
|
|
return {
|
|
namespace: NAMESPACE_GLOBAL,
|
|
key: ['proto_files', requestId ?? 'n/a'],
|
|
};
|
|
}
|
|
|
|
export function useGrpcProtoFiles(activeRequestId: string | null) {
|
|
return useKeyValue<string[]>({ ...protoFilesArgs(activeRequestId), fallback: [] });
|
|
}
|