chore: initialize insar management system v2
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
const s = (set, key) => (v) =>
|
||||
set((state) => ({ [key]: typeof v === 'function' ? v(state[key]) : v }));
|
||||
|
||||
export const useBatchStore = create((set) => ({
|
||||
batchTab: 'dinsar',
|
||||
dinsarBatches: [],
|
||||
psBatches: [],
|
||||
selectedBatchId: '',
|
||||
batchItems: [],
|
||||
batchLoading: false,
|
||||
batchError: '',
|
||||
setBatchTab: s(set, 'batchTab'),
|
||||
setDinsarBatches: s(set, 'dinsarBatches'),
|
||||
setPsBatches: s(set, 'psBatches'),
|
||||
setSelectedBatchId: s(set, 'selectedBatchId'),
|
||||
setBatchItems: s(set, 'batchItems'),
|
||||
setBatchLoading: s(set, 'batchLoading'),
|
||||
setBatchError: s(set, 'batchError'),
|
||||
}));
|
||||
Reference in New Issue
Block a user