@empathyco/x-components
Version:
Empathy X Components
14 lines (11 loc) • 490 B
JavaScript
import { localStorageService } from '../../../../utils/storage.js';
import { HISTORY_QUERIES_ENABLED_KEY } from '../constants.js';
const toggleHistoryQueries = async ({ dispatch, commit }, isEnabled) => {
if (!isEnabled) {
await dispatch('setHistoryQueries', []);
}
commit('setIsEnabled', isEnabled);
localStorageService.setItem(HISTORY_QUERIES_ENABLED_KEY, isEnabled);
};
export { toggleHistoryQueries };
//# sourceMappingURL=toggle-history-queries.action.js.map