mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 03:13:33 +02:00
Generalized frontend model store (#193)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { getKeyValue, setKeyValue } from '../lib/keyValueStore';
|
||||
import { useKeyValue } from './useKeyValue';
|
||||
|
||||
export function protoFilesArgs(requestId: string | null) {
|
||||
@@ -11,11 +10,3 @@ export function protoFilesArgs(requestId: string | null) {
|
||||
export function useGrpcProtoFiles(activeRequestId: string | null) {
|
||||
return useKeyValue<string[]>({ ...protoFilesArgs(activeRequestId), fallback: [] });
|
||||
}
|
||||
|
||||
export async function getGrpcProtoFiles(requestId: string) {
|
||||
return getKeyValue<string[]>({ ...protoFilesArgs(requestId), fallback: [] });
|
||||
}
|
||||
|
||||
export async function setGrpcProtoFiles(requestId: string, protoFiles: string[]) {
|
||||
return setKeyValue<string[]>({ ...protoFilesArgs(requestId), value: protoFiles });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user