@sanity/default-layout
Version:
The default layout components for Sanity
17 lines • 730 B
TypeScript
import type { SearchTerms } from '@sanity/base';
import type { CurrentUser, Schema } from '@sanity/types';
export declare const MAX_RECENT_SEARCHES = 5;
export declare type RecentSearchTerms = SearchTerms & {
__recent: {
index: number;
timestamp: number;
};
};
export interface RecentSearchesStore {
addSearchTerm: (searchTerm: SearchTerms) => RecentSearchTerms[];
getRecentSearchTerms: () => RecentSearchTerms[];
removeSearchTerms: () => RecentSearchTerms[];
removeSearchTermAtIndex: (index: number) => RecentSearchTerms[];
}
export declare function createRecentSearchesStore(schema: Schema, user: CurrentUser): RecentSearchesStore | undefined;
//# sourceMappingURL=recentSearches.d.ts.map