UNPKG

@empathyco/x-components

Version:
18 lines (15 loc) 609 B
import { objectFilter } from '@empathyco/x-utils'; /** * Default implementation for the {@link QueriesPreviewGetters.loadedQueriesPreview} getter. * * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of * the queries preview module. * @returns The loaded previews from the state. */ const loadedQueriesPreview = ({ queriesPreview }) => { return objectFilter(queriesPreview, (_, preview) => { return preview.status === 'success' && preview.totalResults > 0; }); }; export { loadedQueriesPreview }; //# sourceMappingURL=loaded-queries-preview.getter.js.map