Files
outline/app/stores/SearchesStore.ts
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

21 lines
566 B
TypeScript

import uniqBy from "lodash/uniqBy";
import { computed } from "mobx";
import SearchQuery from "~/models/SearchQuery";
import type RootStore from "./RootStore";
import Store, { RPCAction } from "./base/Store";
export default class SearchesStore extends Store<SearchQuery> {
actions = [RPCAction.List, RPCAction.Delete];
constructor(rootStore: RootStore) {
super(rootStore, SearchQuery);
}
@computed
get recent(): SearchQuery[] {
return uniqBy(this.orderedData, "query")
.filter((search) => search.source === "app")
.slice(0, 8);
}
}