mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-06 05:19:05 -05:00
13 lines
360 B
TypeScript
13 lines
360 B
TypeScript
import { useKeyValue } from './useKeyValue';
|
|
|
|
export function protoFilesArgs(requestId: string | null) {
|
|
return {
|
|
namespace: 'global' as const,
|
|
key: ['proto_files', requestId ?? 'n/a'],
|
|
};
|
|
}
|
|
|
|
export function useGrpcProtoFiles(activeRequestId: string | null) {
|
|
return useKeyValue<string[]>({ ...protoFilesArgs(activeRequestId), fallback: [] });
|
|
}
|