@empathyco/x-components
Version:
Empathy X Components
18 lines (15 loc) • 609 B
JavaScript
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