mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
fix(Redux): fix the presisted redux store.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useMutation } from 'react-query';
|
||||
import useApiRequest from '../useRequest';
|
||||
import { useAuthActions } from '../state';
|
||||
import { persistor } from 'store/createStore';
|
||||
|
||||
/**
|
||||
* Authentication login.
|
||||
@@ -15,6 +16,9 @@ export const useAuthLogin = (props) => {
|
||||
select: (res) => res.data,
|
||||
onSuccess: (data) => {
|
||||
setLogin(data.data);
|
||||
|
||||
// Run the store persist.
|
||||
persistor.persist();
|
||||
},
|
||||
...props
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user