umami/store/queries.js

14 lines
236 B
JavaScript
Raw Normal View History

2023-05-20 18:02:08 +02:00
import { create } from 'zustand';
const store = create(() => ({}));
export function saveQuery(key, data) {
store.setState({ [key]: data });
}
export function getQuery(key) {
return store.getState()[key];
}
export default store;