1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

add eslint-plugin-prettier

This commit is contained in:
Fedor Katurov 2025-01-24 17:51:59 +07:00
parent 0e4d2bf44d
commit ba0604ab9d
69 changed files with 419 additions and 249 deletions

View file

@ -24,11 +24,13 @@ export class FlowStore {
/** removes node from updated after user seen it */
seenNode = (nodeId: number) => {
this.setUpdated(this.updated.filter(node => node.id !== nodeId));
this.setUpdated(this.updated.filter((node) => node.id !== nodeId));
};
/** replaces node with value */
updateNode = (id: number, node: Partial<IFlowNode>) => {
this.setNodes(this.nodes.map(it => (it.id === id ? { ...it, ...node } : it)));
this.setNodes(
this.nodes.map((it) => (it.id === id ? { ...it, ...node } : it)),
);
};
}

View file

@ -12,7 +12,9 @@ export class MetadataStore {
pending: string[] = [];
constructor(
protected apiMetadataLoader: (ids: string[]) => Promise<Record<string, EmbedMetadata>>
protected apiMetadataLoader: (
ids: string[],
) => Promise<Record<string, EmbedMetadata>>,
) {
makeAutoObservable(this);
}
@ -59,7 +61,7 @@ export class MetadataStore {
try {
const result = await this.apiMetadataLoader(items);
const fetchedIDs = values(result).map(it => it.address);
const fetchedIDs = values(result).map((it) => it.address);
runInAction(() => {
this.pushMetadataItems(result);
@ -72,7 +74,11 @@ export class MetadataStore {
/** adds items to queue */
enqueue = (id: string) => {
if (this.queue.includes(id) || keys(this.metadata).includes(id) || this.pending.includes(id)) {
if (
this.queue.includes(id) ||
keys(this.metadata).includes(id) ||
this.pending.includes(id)
) {
return;
}