feat(redux): Added Redux dev tools

This commit is contained in:
Daniel Gonzalez
2021-03-09 17:22:26 -04:00
parent fe47574418
commit e1417fc10d
+11 -5
View File
@@ -2,10 +2,7 @@ import { createStore as reduxCreateStore } from 'redux'
// Wallet from localStorage
import { getWalletInfo, setWalletInfo } from '../components/localWallet'
// import BchWallet from 'minimal-slp-wallet'
const BchWallet =
typeof window !== 'undefined'
? window.SlpWallet
: null
const BchWallet = typeof window !== 'undefined' ? window.SlpWallet : null
const reducer = (state, action) => {
// Update walletInfo state property
@@ -120,5 +117,14 @@ const initialState = {
}
}
const createStore = () => reduxCreateStore(reducer, initialState)
const createStore = () =>
reduxCreateStore(
reducer,
initialState,
/** Redux DevTools
* https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=es
*
*/
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
)
export default createStore