Skip to content

Commit

Permalink
Merge pull request #169 from BWangy/dev
Browse files Browse the repository at this point in the history
Switched to indexedDB
  • Loading branch information
raffazizzi authored Oct 1, 2024
2 parents 5c4dfd0 + 391ae89 commit 3122362
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"form-data": "^2.3.2",
"html-webpack-plugin": "^2.30.1",
"linkedom": "0.14.21",
"localforage": "^1.10.0",
"mocha": "^6.2.0",
"node-sass": "^7.0.3",
"react": "^16.9.0",
Expand Down
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { createStore, applyMiddleware } from 'redux'
import { routerMiddleware, ConnectedRouter, connectRouter } from 'connected-react-router'
import createHistory from 'history/createBrowserHistory'
import { persistStore, persistCombineReducers } from 'redux-persist'
import storage from 'redux-persist/es/storage'
/* import storage from 'redux-persist/es/storage' */
import localForage from './localForageConfig'
import { PersistGate } from 'redux-persist/es/integration/react'
import reducers from './reducers'
import App from './components/App'
Expand All @@ -26,7 +27,7 @@ const history = createHistory({ basename })

const persistConf = {
key: 'root',
storage,
storage: localForage,
blacklist: ['router']
}

Expand Down
10 changes: 10 additions & 0 deletions src/localForageConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import localForage from 'localforage'

localForage.config({
driver: localForage.INDEXEDDB,
name: 'romajs',
version: 1.0,
storeName: 'keyvaluepairs',
})

export default localForage

0 comments on commit 3122362

Please sign in to comment.