mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-12 01:14:27 +02:00
Lint stuff
This commit is contained in:
@@ -22,7 +22,9 @@ export function listen<K extends keyof RpcEventSchema>(
|
||||
): () => void {
|
||||
let unsub: (() => void) | null = null;
|
||||
tauriListen<RpcEventSchema[K]>(event, (e) => callback(e.payload))
|
||||
.then((fn) => (unsub = fn))
|
||||
.then((fn) => {
|
||||
unsub = fn;
|
||||
})
|
||||
.catch(console.error);
|
||||
return () => unsub?.();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import { createModelStore } from "@yaakapp-internal/model-store";
|
||||
import type { HttpExchange } from "../../crates-proxy/yaak-proxy-lib/bindings/gen_models";
|
||||
|
||||
type ProxyModels = {
|
||||
http_exchange: HttpExchange;
|
||||
};
|
||||
|
||||
export const { dataAtom, applyChange, listAtom, orderedListAtom } =
|
||||
createModelStore<HttpExchange>();
|
||||
createModelStore<ProxyModels>(["http_exchange"]);
|
||||
|
||||
export const httpExchangesAtom = orderedListAtom(
|
||||
"http_exchange",
|
||||
|
||||
Reference in New Issue
Block a user