mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat(ManualJournals): Auto-increment.
fix(BillPayment): Validate the opened payment bills. fix(redux): presist redux state. fix(useRequestQuery): hook.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import t from 'store/types';
|
||||
import { createReducer } from '@reduxjs/toolkit';
|
||||
import { persistReducer } from 'redux-persist';
|
||||
import storage from 'redux-persist/lib/storage'; // defaults to localStorage for web
|
||||
import storage from 'redux-persist/lib/storage';
|
||||
|
||||
const initialState = {
|
||||
pageTitle: '',
|
||||
@@ -18,6 +18,8 @@ const initialState = {
|
||||
backLink: false,
|
||||
};
|
||||
|
||||
const STORAGE_KEY = 'bigcapital:dashboard';
|
||||
|
||||
const reducerInstance = createReducer(initialState, {
|
||||
[t.CHANGE_DASHBOARD_PAGE_TITLE]: (state, action) => {
|
||||
state.pageTitle = action.pageTitle;
|
||||
@@ -117,14 +119,10 @@ const reducerInstance = createReducer(initialState, {
|
||||
|
||||
export default persistReducer(
|
||||
{
|
||||
key: 'bigcapital:dashboard',
|
||||
blacklist: [
|
||||
'pageTitle',
|
||||
'pageSubtitle',
|
||||
'pageHint',
|
||||
'preferencesPageTitle',
|
||||
'topbarEditViewId',
|
||||
'backLink',
|
||||
key: STORAGE_KEY,
|
||||
whitelist: [
|
||||
'sidebarExpended',
|
||||
'previousSidebarExpended',
|
||||
],
|
||||
storage,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user