mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-20 13:11:44 +00:00
before applying redux
This commit is contained in:
15
browser/main/HomeContainer/reducer.js
Normal file
15
browser/main/HomeContainer/reducer.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {combineReducers} from 'redux'
|
||||
|
||||
const initialCurrentUser = JSON.parse(localStorage.getItem('currentUser'))
|
||||
|
||||
function currentUser (state, action) {
|
||||
switch (action.type) {
|
||||
|
||||
default:
|
||||
return initialCurrentUser
|
||||
}
|
||||
}
|
||||
|
||||
export default combineReducers({
|
||||
currentUser
|
||||
})
|
||||
Reference in New Issue
Block a user