Files
bigcapital/client/src/store/customers/customers.reducer.js
a.bouhuolia 9ff8e3159d feat(ManualJournals): Auto-increment.
fix(BillPayment): Validate the opened payment bills.
fix(redux): presist redux state.
fix(useRequestQuery): hook.
2021-03-18 14:23:37 +02:00

27 lines
565 B
JavaScript

import { createReducer } from '@reduxjs/toolkit';
import { persistReducer } from 'redux-persist';
import storage from 'redux-persist/lib/storage';
import { createTableStateReducers } from 'store/tableState.reducer';
const initialState = {
tableState: {
pageSize: 12,
pageIndex: 0,
},
};
const reducerInstance = createReducer(initialState, {
...createTableStateReducers('CUSTOMERS'),
});
const STORAGE_KEY = 'bigcapital:estimates';
export default persistReducer(
{
key: STORAGE_KEY,
whitelist: ['tableState'],
storage,
},
reducerInstance,
);